1. Get a Specific Document
-
Endpoint:
/document/<document_id> - HTTP Method: GET
-
URL Params:
-
document_id(required): The unique identifier of the document.
-
- Description: Retrieves the download URL and state of a specific document by its ID.
2. Get a List of Documents
-
Endpoint:
/document - HTTP Method: GET
-
URL Params:
-
page_num(optional, default = 1): The page number for pagination. -
page_size(optional, default = 50): The number of items per page.
-
- Description: Provides a paginated list of documents, filtered by status ("APPROVED").
3. Get Document Versions List
-
Endpoint:
/document/<int:document_id>/versions - HTTP Method: GET
-
URL Params:
-
document_id(required): The unique identifier of the document. -
page_num(optional, default = 1): The page number for pagination. -
page_size(optional, default = 50): The number of items per page.
-
- Description: Retrieves a paginated list of all versions of a specified document.
4. Get a Specific Document Version
-
Endpoint:
/document/<int:document_id>/version/<int:version_number> - HTTP Method: GET
-
URL Params:
-
document_id(required): The unique identifier of the document. -
version_number(required): The specific version number of the document.
-
- Description: Fetches details of a specific version of a given document.
5. Get Approvals for a Document Version
-
Endpoint:
/document/<int:document_id>/version/<int:version_number>/approvals - HTTP Method: GET
-
URL Params:
-
document_id(required): The unique identifier of the document. -
version_number(required): The specific version number of the document. -
page_num(optional, default = 1): The page number for pagination. -
page_size(optional, default = 50): The number of items per page.
-
- Description: Provides a list of approvals for a specific version of a document, with pagination.
6. Create a New Document
-
Endpoint:
/document - HTTP Method: POST
-
Request Body:
-
title(required): Title of the document.
-
- Description: Creates a new document based on the provided JSON data.
7. Create a New Version of a Document
-
Endpoint:
/document/<document_id>/version - HTTP Method: POST
-
URL Params:
-
document_id(required): The unique identifier of the document.
-
- Request Body: JSON containing the details of the document version.
- Description: Adds a new version to an existing document based on the provided JSON data.
8. Update a Document
-
Endpoint:
/document/<document_id> - HTTP Method: PATCH
-
Request Body:
-
document_id(required): The unique identifier of the document to be updated.
-
- Description: Updates the specified document with the provided JSON data.
Comments
0 comments
Please sign in to leave a comment.