API Documentation
|
where {orgId}
is the ID of an organisation.
GET
- retrieves a list of information associated with file objects/Secure Objects and folders/collections (i.e. items) within a given organisation (specified by orgId
).This API endpoint retrieves a list of information associated with files and folders within a given organisation (specified by orgId
).
The items returned in a response to this API endpoint can also be filtered either according to those:
In addition to this filtering, further filtering can be performed, based on the ownership or sharing status on these items, where 'sharing status' means items that a Cocoon Data user either has shared or is a collaborator on.
This API endpoint supports requests utilizing Cocoon Data user accounts with the following roles (as described in the Organisation Administrator's Guide):
{orgId}
in the request's 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 optional parameters can be sent in the URL of the GET request:
0
forces the filtering of items to those at the root level only. The default value of this parameter is null
(by omitting this parameter in the request). Omitting this parameter as well as: sharing
is equivalent to specifying this collectionId parameter with a value of 0
, which filters for items at the root level only. sharing
does not result in items being filtered to those located only at the root level (or immediately within any parent folder). sharing
filters for all items (regardless of their location) which are owned and currently shared by the Cocoon Data user whose access token is passed in the header of the request. true
) or not (false
) file objects whose state is Incomplete should also be retrieved in the response. If this parameter is omitted, then its value is false
by default. 0
to 100
indicating the maximum number of items to be returned in the response. If this parameter is omitted, then its value is 10
by default. 0
. If this parameter is omitted, then its value is 0
by default, which results in items being retrieved for the response from its starting item/count (based on the scope and ordering of all retrievable items from the Cocoon Data Platform). ASC
) or descending order (DESC
). If this parameter is omitted, then its value is ASC
by default. NAME
- sorts by the value of the item's name property. OWNER
- sorts by the value of the item's owner property. MODIFIED
- sorts by the value of the item's modifiedAt property. CREATED
- sorts by the value of the item's createdAt property. NAME
by default. owned-by-me
- retrieves only items that this user currently owns. shared-with-me
- retrieves only items that this user is a collaborator on (i.e. other people have shared these items with this user). sharing
- retrieves only items that this user has shared with other people. all
- retrieves all items that this user has access to. all
by default. If sharing
is specified for this parameter's value and collectionId is omitted, then all items currently owned and shared by this Cocoon Data user are returned in the response (i.e. there is no additional filtering to items only located at the root level or immediately within any parent folder). If the request succeeded, then an HTTP response status 200 OK
is returned.
For successful requests only, a JSON-formatted response containing the following members is also returned:
null
. 0
indicates that this item is located at the logical root location. null
indicates that this item is located at the logical root location. POST
method on the respective <access-service>/api/v1/organisations/{orgGroupId}/objects or <access-service>/api/v1/organisations/{orgId}/collections endpoints), this date and time should match (or be close to) that of the createdAt value above. Otherwise, if the folder has since been modified (via the PUT
method on the respective <access-service>/api/v1/objects/{objectId} or <access-service>/api/v1/collections/{collectionId} endpoints), this date and time should reflect when the folder was last modified. object
if the item is a file object or collection
if the item is a folder. null
. incomplete
for an initialized file object, created
for a completed file or deleted
for a deleted file.