API Documentation
Toggle TOC panel
<access-service>/api/v1/organisations/{orgGroupId}/users/{userId}/itemCount

URL structure

1 https://access-service.xy-company.com/api/v1/organisations/{orgGroupId}/users/{userId}/itemCount

where {orgGroupId} is the ID of an organisation and {userId} is the ID of a Cocoon Data user account.

Supported methods and overview

  • GET - retrieves the total number of file objects/Secure Objects currently owned by a Cocoon Data user (specified by userId) within an organisation (specified by orgGroupId).

Note: This method takes no parameters.

Detailed description

This API endpoint retrieves the total number of file objects/Secure Objects currently owned by a Cocoon Data user (specified by userId) within an organisation (specified by orgGroupId).

A Cocoon Data user's ID can be obtained by calling the GET method of the <access-service>/api/v1/organisations/{orgGroupId}/users API endpoint, which retrieves a list of information associated with existing users in an organisation (specified by orgGroupId), which can be filtered through a variety of 'search' criteria.

This endpoint is useful for determining the number of file objects that a Cocoon Data user owns, before transferring the ownership of these items over to another user.

Note: Although this endpoint indicates items in its URL, calling it only returns the total number of file objects (i.e. folders/collections are not counted). However, when actually transferring the ownership of items from one Cocoon Data user to another, all of the user's items (i.e. all their file objects and folders) are transferred.

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:

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

A JSON-formatted response containing the following members:

  • count - The total number of file objects currently owned by the Cocoon Data user specified by userId in this endpoint's URL.
    Example (response):
    {
    "count": 16
    }