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:
NameTypeRequiredDescription
contentIDStringtrueID of the content whose version is going to be returned
versionIDIntegertrueContent version to be returned
Query Parameters:
NameTypeRequiredDescription
fieldsStringfalseFields to be returned. If not specified then all fields will be included.
Retrieves:
  • ContentVersion containing the specified version of the content
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    contentIDStringtrueID of the content whose versions are going to be returned
    Query Parameters:
    NameTypeRequiredDescription
    startIndexIntegerfalseZero-relative index of the first matching content to be returned
    countIntegerfalseMaximum number of contents to be returned
    fieldsStringfalseFields to be returned on each content. If not specified then relevant fields will be included.
    Retrieves:
  • ContentVersion[]
  • Return Status:
    HTTP Status CodeDescription
    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:
    NameTypeRequiredDescription
    contentIDStringtrueID of the content that is going to be updated based on a given version.
    versionIDIntegertrueContent version to use to update the content.
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseFields to be returned. If not specified then all fields will be included.
    Retrieves:
  • ContentVersion containing the new content version based on the old one.
  • Return Status:
    HTTP Status CodeDescription
    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