API Documentation
|
where {collectionId}
is the ID of a folder/collection.
GET
- retrieves information about a folder/collection (specified by collectionId
).PUT
- modifies the properties of a folder (specified by collectionId
). This involves the folder's owner or a collaborator with sufficient permissions on the folder 1 , performing any combination of the following:DELETE
- removes a folder (specified by collectionId
) to its owner's Recycle Bin (known as 'recycling'), which changes the folder's state to Recycled. This can be performed by the folder's owner or a collaborator with sufficient permissions on the folder 1 . Note: Both the
GET
andDELETE
methods take no parameters.
This API endpoint serves a number of purposes:
GET method requests:
collectionId
). A folder's ID can be obtained using the <access-service>/api/v1/organisations/{orgId}/items API endpoint, which retrieves a list of information associated with folders in an organisation that can be filtered using a variety of search criteria.PUT method requests:
collectionId
):GET
method on the <content-service>/api/v1/objects/{objectId}/view endpoint).GET
method on the <content-service>/api/v1/objects/{objectId}/contents endpoint).POST
method on the <access-service>/api/v1/organisations/{orgGroupId}/objects endpoint), through the Upload File permission.POST
method on the <content-service>/api/v1/objects/{objectId}/contents endpoint), again through the Upload File permission.POST
method on the <content-service>/api/v1/objects/{objectId}/versions endpoint), through the Upload File permission.POST
method on the <access-service>/api/v1/organisations/{orgId}/collections endpoint), through the Create Folder permission.PUT
method on either the <access-service>/api/v1/objects/{objectId} endpoint or this endpoint's name parameter). The Rename permission also provides access to a file's other versions, which includes the ability to perform any of the following actions:GET
method on the <access-service>/api/v1/objects/{itemId}/versions endpoint).GET
method on the <content-service>/api/v1/versions/{versionId}/view endpoint).GET
method on the <content-service>/api/v1/versions/{versionId}/contents endpoint).PUT
method on the <access-service>/api/v1/objects/{itemId}/versions/{versionId} endpoint).DELETE
method on the <access-service>/api/v1/objects/{itemId}/versions/{versionId} endpoint).DELETE
method on the <access-service>/api/v1/objects/{objectId} endpoint (through the Remove (File) permission) or this endpoint itself (through the Remove (Folder) permission), respectively. PUT
method on either the <access-service>/api/v1/objects/{objectId} or this endpoint's parentId parameter). A common folder hierarchy is a folder hierarchy that contains this new folder (including items subsequently contained within it), in which the same collaborator has also been added (with either the Modify or Manage permission set) to a higher level (i.e. a common) folder, such that this higher level folder forms the top of the folder's hierarchy.POST
method on the <access-service>/api/v1/organisations/{orgGroupId}/objects endpoint or PUT
method on the <access-service>/api/v1/objects/{objectId} endpoint, orPOST
method on the <access-service>/api/v1/organisations/{orgId}/collections endpoint or this endpoint's collaborators parameter.collectionId
) will be moved.1 This owner or collaborator is a Cocoon Data user, whose access token is submitted in the request to this endpoint. A folder's:
2 If any of these items are subsequently moved to a child folder on which a more restrictive permission set (listed above) has been applied for a given collaborator, then that collaborator will only possess the relevant permissions (granted by this more restrictive permission set) on this child folder and any other items contained within it. The exceptions are the Remove (File) and Remove (Folder) permissions, which are propagated down through a folder hierarchy, regardless of whether or not a more restrictive permission set has been applied to an item further down the hierarchy.
3 Relates to the active version of the file.
DELETE method requests:
This API endpoint supports requests utilizing Cocoon Data user accounts with the following roles (as described in the Organisation Administrator's Guide) and conditions:
GET
, PUT
and DELETE
methods, when this user owns the folder whose ID is specified by {collectionId}
in the request's URL.GET
and PUT
methods, when this user is a collaborator on the folder whose ID is specified by {collectionId}
in the URL. For the PUT
method, such a collaborator user can set the:DELETE
method, when this user is a collaborator with the Remove (Folder) permission on the folder whose ID is specified by {collectionId}
in the URL.The Cocoon Data Platform's resources available to one of these Cocoon Data users (above) is determined by the access token submitted in the header of requests to this endpoint.
The appropriate access token as the Bearer
token:
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...
The following header is required if the body of the request has a JSON object:
Content-Type: application/json
The following optional parameters can be sent in the body of the PUT request, each as individual members of a JSON object:
collectionId
) - A parameter containing the following optional sub-element parameters that relate to the collaborators being applied to this folder: collectionId
) - The name to apply to the folder. For example, any new name for the folder. collectionId
) - The ID of the folder that will contain this folder (specified collectionId
). This is the folder to which the collectionId
. Specifying a value of 0
results in the folder (collectionId
) being located at/moved to the default logical root storage location. collectionId
. collectionId
, then this user must have the Move permission (on both of these folders) inherited from a common parent folder, where parentId could also be the common parent folder itself. collectionId
folder (or vice versa), then it is not possible to move the collectionId
folder into the parentId folder. If the request succeeded, then an HTTP response status 200 OK
is returned.
For successful GET
and PUT
requests only, a JSON-formatted response containing the following members is also returned:
POST
method on the <access-service>/api/v1/organisations/{orgId}/collections endpoint), this date and time should match (or be close to) that of the createdAt value below. Otherwise, if the folder has since been modified (e.g. via a PUT
method request to this endpoint), this date and time should reflect when the folder was last modified. false
. server.useraccounttype.
This I18N code could include the substring local
, ldap
or external
. true
) or not (false
) two-factor authentication has been enforced for all members of the organisation. collection
, which in turn indicates that information about item returned from this request is about a folder. null
or 0
. A value of null
indicates that the folder's location in its hierarchy of folders (e.g. as indicated in a SafeShare application's list of items) are equivalent between this collaborator and the current owner of this folder. A value of 0
indicates that the folder is being shared from the logical root file area/location of this collaborator's account. In SafeShare applications, this occurs when the owner of this folder has shared the folder with this collaborator, but the folder's parent folder has not also been shared with this collaborator. null
. 0
indicates that this folder is located at the logical root location.