API Documentation
Toggle TOC panel
<access-service>/api/v1/objects/{itemId}/versions/{versionId}

URL structure

1 https://access-service.xy-company.com/api/v1/objects/{objectId}/versions/{versionId}

where {objectId} is the ID of a file object/Secure Object and {versionId} is the ID of one of its versions.

Supported methods and overview

  • PUT - sets the active version (specified by versionId) of a file object/Secure Object (specified by objectId).
  • DELETE - deletes a version (specified by versionId) of a file object (specified by objectId), permanently.

Note: Both of these methods take no other parameters.

Detailed description

This API endpoint serves a number of purposes:

  • Sets the active version (specified by versionId) of a file object (specified by objectId).
  • Deletes a version (specified by versionId) of a file object (specified by objectId), permanently.
    Note: A successful request using this method also deletes this version's content (via the Cocoon Data Platform's Content Service) automatically.

Supported roles and conditions

This API endpoint supports requests utilizing Cocoon Data user accounts with the following roles (as described in the Organisation Administrator's Guide) and conditions:

  • Originator - when this user owns the file object whose ID is specified by {itemId} in the request's URL.
  • Originator, Collaborator and Ad hoc - when this user is a collaborator with the Rename permission on the file object whose ID is specified by {itemId} in the URL. (The Rename permission restricts access to collaborators who have been applied either the Modify or Manage permission set on this file object.)

The Cocoon Data Platform's resources available to a Cocoon Data user meeting the criteria above is determined by the access token submitted in the header of requests to this endpoint.

Required headers

The appropriate access token as the Bearer token:

  • Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...

Returns

If the request succeeded, then an HTTP response status 200 OK is returned.