kbendick commented on a change in pull request #3561: URL: https://github.com/apache/iceberg/pull/3561#discussion_r757705870
########## File path: rest_docs/rest-catalog-v0.1-SNAPSHOT.md ########## @@ -0,0 +1,1810 @@ +--- +title: Apache Iceberg REST Catalog API v1.0.0 +language_tabs: + - shell: Shell + - java: Java +language_clients: + - shell: "" + - java: "" +toc_footers: [] +includes: [] +search: true +highlight_theme: darkula +headingLevel: 2 + +--- + +<!-- Generator: Widdershins v4.0.1 --> + +<h1 id="apache-iceberg-rest-catalog-api">Apache Iceberg REST Catalog API v1.0.0</h1> + +> Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu. + +Defines the specification for the first version of the REST Catalog API. Implementations should support both Iceberg table specs v1 and v2, with priority given to v2. + +Base URLs: + +* <a href="http://127.0.0.1:1080">http://127.0.0.1:1080</a> + +License: <a href="https://www.apache.org/licenses/LICENSE-2.0.html">Apache 2.0</a> + +# Authentication + +- HTTP Authentication, scheme: bearer + +<h1 id="apache-iceberg-rest-catalog-api-configuration-api">Configuration API</h1> + +## getConfig + +<a id="opIdgetConfig"></a> + +> Code samples + +```shell +# You can also use wget +curl -X GET http://127.0.0.1:1080/v1/config \ + -H 'Accept: application/json' \ + -H 'Authorization: Bearer {access-token}' + +``` + +```java +URL obj = new URL("http://127.0.0.1:1080/v1/config"); +HttpURLConnection con = (HttpURLConnection) obj.openConnection(); +con.setRequestMethod("GET"); +int responseCode = con.getResponseCode(); +BufferedReader in = new BufferedReader( + new InputStreamReader(con.getInputStream())); +String inputLine; +StringBuffer response = new StringBuffer(); +while ((inputLine = in.readLine()) != null) { + response.append(inputLine); +} +in.close(); +System.out.println(response.toString()); + +``` + +`GET /v1/config` + +*List all catalog configuration settings* + +All REST catalogs will be initialized by calling this route. This route will return at least the minimum necessary metadata to initialize the catalog. Optionally, it can also include server-side specific overrides. For example, it might also include information used to initialize this catalog such as the details of the Http connection pooling, etc. This route might also advertise information about operations that are not implemented so that the catalog can eagerly throw or go about another way of performing the desired action. Review comment: **TLDR** - I'll update the example description for sure as the connection pooling is pretty application specific 👍 Though we might want to allow for a one time call to get that sort of information from more of a data operations team as analysts and other end users might not want to have to deal with configuring everything. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
