> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cocoondata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# <access-service>/api/v1/organisations/{orgGroupId}/users/{userId}/itemCount

## URL structure&#x20;

```text theme={null}
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&#x20;

* `GET` - retrieves the total number of file objects/[Secure Object](/CS1.2/api/working-with-files-and-folders-fundamentals.md#secure-object)s currently owned by a [Cocoon Data user](/CS1.2/api/authentication-and-authorisation.md) (specified by `userId`) within an organisation (specified by `orgGroupId`).

> [!NOTE]
>
> This method takes no parameters.

## Detailed description&#x20;

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](/CS1.2/api/access-service-api-v1-organisations-orggroupid-users.md) 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](/CS1.2/api/access-service-api-v1-organisations-orgid-items-transfer.md) over to another user.

> [!NOTE]
>
> Although this endpoint indicates [items](/CS1.2/api/working-with-files-and-folders-fundamentals.md#item) in its URL, calling it only returns the total number of file objects (i.e. folders/[collections](/CS1.2/api/working-with-files-and-folders-fundamentals.md#collection) 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&#x20;

This API endpoint supports requests utilising Cocoon Data user accounts with the following [roles](/CS1.2/admin-org/administering-users-within-an-organisation.md#an-organisation-users-roles) (as described in the [Organisation Administrator's Guide](/CS1.2/admin-org.md)) and conditions:

* [Organisation administrator](/CS1.2/admin-org/administering-users-within-an-organisation.md#organisation-administrator-role) - when this user is a member of the organisation specified by `{orgGroupId}` in the request's URL.

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](/CS1.2/api/access-service-api-v1-organisations-orggroupid-users-userid-itemcount.md#access-service-api-v1-organisations-orggroupid-users-userid-itemcount-required-headers) of requests to this endpoint.

## Required headers&#x20;

The appropriate access token as the `Bearer` token:

* `Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...`

## Returns&#x20;

A JSON-formatted response containing the following members:

* **count** - The total number of file objects currently owned by the [Cocoon Data user](/CS1.2/api/authentication-and-authorisation.md) specified by `userId` in this endpoint's URL. \

  **Example (response):**

  ```json theme={null}
  {
      "count": 16
  }
  ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.