rdblue commented on a change in pull request #3561:
URL: https://github.com/apache/iceberg/pull/3561#discussion_r760572030



##########
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:
       I think we need to be really clear about what can be returned here and 
what the requirements are. This is similar to my question about whether these 
are defaults or overrides. We definitely want to set clear expectations.
   
   I think we probably want:
   * Settings from the server to be used as defaults, unless we want to support 
both defaults and overrides. Explicit local config should take priority, or 
else users would be unable to make changes.
   * This should be called first in initialization and all real initialization 
should happen with the updated properties.
   * The connection used to fetch server config should be thrown away so that 
all of the returned defaults are used for subsequent connections
   
   Now that I'm thinking about it more, I think we will want two sets, defaults 
and overrides. That way the server can do things like send a session token to 
replace the original credentials or force certain behaviors when something 
isn't supported.




-- 
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]

Reply via email to