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



##########
File path: rest_docs/rest-catalog-open-api.yaml
##########
@@ -367,6 +367,90 @@ paths:
       - $ref: '#/components/parameters/namespace'
       - $ref: '#/components/parameters/table'
 
+    get:
+      tags:
+        - Catalog API
+      summary: Load a table from the catalog
+      operationId: loadTable
+      description:
+        Load a table from the catalog.
+
+        The response contains both configuration and table metadata. The 
configuration, if non-empty is used
+        as additional configuration for the table that overrides catalog 
configuration. For example, this
+        configuration may change the FileIO implemented used for the table.
+
+        The response also contains the table's full metadata.
+      responses:
+        200:
+          $ref: '#/components/responses/LoadTableResponse'
+        400:
+          $ref: '#/components/responses/BadRequestErrorResponse'
+        401:
+          $ref: '#/components/responses/UnauthorizedResponse'
+        404:
+          description:
+            Not Found - NoSuchTableException, table to load does not exist
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/responses/IcebergErrorResponse'
+              examples:
+                TableToRenameDoesNotExist:
+                  $ref: '#/components/examples/NoSuchTableError'
+        5XX:
+          $ref: '#/components/responses/ServerErrorResponse'
+
+    post:
+      tags:
+        - Catalog API
+      summary: Commit updates to a table
+      operationId: updateTable
+      description:
+        Commit updates to a table.
+
+        Commits have two parts, requirements and updates. Requirements are 
assertions that will be validated
+        before attempting to make and commit changes. For example, 
assert-ref-snapshot-id will check that a
+        named ref's snapshot ID has a certain value.
+
+        Updates are changes to make to table metadata. For example, after 
asserting that the current main ref
+        is at the expected snapshot, a commit may add a new child snapshot and 
set the ref to the new
+        snapshot id.
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/CommitTableRequest'
+      responses:
+        200:
+          description: OK
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/responses/CommitTableResponse'
+        400:
+          $ref: '#/components/responses/BadRequestErrorResponse'
+        401:
+          $ref: '#/components/responses/UnauthorizedResponse'
+        404:
+          description:
+            Not Found - NoSuchTableException, table to load does not exist
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/responses/IcebergErrorResponse'
+              examples:
+                TableToRenameDoesNotExist:
+                  $ref: '#/components/examples/NoSuchTableError'
+        409:
+          description:
+            Conflict - CommitFailedException, one or more requirements failed. 
The client may retry.

Review comment:
       I updated this so that the description documents what to do. After 
looking through the list of [status 
codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes), I think that 
only 500 (generic error) and 504 (gateway timeout) should leave the table in an 
unknown state. Other error codes indicate that the operation wasn't attempted, 
like 501 (not implemented).




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