Document CRUD based on a document path.
Create a Document
POST /path/PARENT_DOC_PATH
Path Parameters
Parameter Name | Value | Description |
---|---|---|
PARENT_DOC_PATH | string | The parent document path. |
Request Body
Supply a document entity representing the document to create with the following properties:
Property Name | Value | Description | Notes |
---|---|---|---|
entity-type | string | Value: the fixed string "document" . |
|
name | string | The document name, used as path segment. | |
type | string | The document type. | |
properties | object | A collection of key-value pairs of document properties to set. | Optional |
You don't need to specify the
uid
property since the server will create a document id. It will be part of the response body of a GET request on the created document.
Response
If successful, returns a document entity representing the created document.
Status Codes
- 201 Created - Success.
- 404 Not Found - Document with the given
PARENT_DOC_PATH
path parameter not found.
Get a Document
GET /path/DOC_PATH
Path Parameters
Parameter Name | Value | Description |
---|---|---|
DOC_PATH | string | The document path. |
Response
If successful, returns a document entity representing the document with the given DOC_PATH
path parameter.
Status Codes
- 200 OK - Success.
- 404 Not Found - Document with the given
DOC_PATH
path parameter not found.
Update a Document
PUT /path/DOC_PATH
Path Parameters
Parameter Name | Value | Description |
---|---|---|
DOC_PATH | string | The document path. |
Request Body
Supply a document entity representing the document to update with the following properties:
Property Name | Value | Description | Notes |
---|---|---|---|
entity-type | string | Value: the fixed string "document" . |
|
properties | object | A collection of key-value pairs of document properties to update. | Optional |
The
uid
property is not required but is accepted by the server. This is useful since it is part of the response body of a GET request, which you might want to reuse as a base request body for a PUT request by adapting only the properties to update.
Response
If successful, returns a document entity representing the updated document.
Status Codes
- 20O OK - Success.
- 404 Not Found - Document with the given
DOC_PATH
path parameter not found.
Delete a Document
DELETE /path/DOC_PATH
Path Parameters
Parameter Name | Value | Description |
---|---|---|
DOC_PATH | string | The document path. |
Response
If successful, deletes the document with the given DOC_PATH
path parameter.
This request performs a permanent delete, it doesn't put the document in the trash.
Status Codes
- 204 No Content - Success.
- 404 Not Found - Document with the given
DOC_PATH
path parameter not found.