ContentVersion
ContentVersion Service
Core API endpoint for retrieving and managing versions of documents and files.
Get Version
GET /versions/{contentID}/{versionID}
Return the specified version of a content with the specified fields.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
contentID | String | true | ID of the content whose version is going to be returned |
versionID | Integer | true | Content version to be returned |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to be returned. If not specified then all fields will be included. |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input value is missing or malformed |
403 (Forbidden) | You are not allowed to access the specified content |
404 (Not Found) | The specified content or version do not exist |
Get Versions
GET /versions/{contentID}
Return a paginated list of versions of the specified content.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
contentID | String | true | ID of the content whose versions are going to be returned |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
startIndex | Integer | false | Zero-relative index of the first matching content to be returned |
count | Integer | false | Maximum number of contents to be returned |
fields | String | false | Fields to be returned on each content. If not specified then relevant fields will be included. |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input value is missing or malformed |
403 (Forbidden) | You are not allowed to access the specified content |
404 (Not Found) | The specified content or version do not exist |
Create Version
POST /versions/{contentID}/{versionID}
Restore a content version by creating a copy of the version to restore as the newest content version and returning that content version.
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
contentID | String | true | ID of the content that is going to be updated based on a given version. |
versionID | Integer | true | Content version to use to update the content. |
Query Parameters:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Fields to be returned. If not specified then all fields will be included. |
Retrieves:
Return Status:
HTTP Status Code | Description |
---|---|
200 (OK) | Request was successful |
400 (Bad Request) | An input value is missing or malformed |
403 (Forbidden) | You are not allowed to access the specified content |
409 (Conflict) | The new content version would conflict with system restrictions (such as two documents with the same subject) if the subject of the content is not unique in the community |
404 (Not Found) | The specified content or version do not exist |