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

URL structure

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

where {orgGroupId} is the ID of an organisation.

Supported methods and overview

  • GET - retrieves a summary of information about the numbers of Cocoon Data users assigned to each role (where one user may possess more than one role) within an organisation (specified by orgGroupId).

Note: This method takes no parameters.

Detailed description

This API endpoint retrieves a summary of information about the numbers of Cocoon Data users assigned to each role (where one user may possess more than one role) within an organisation (specified by orgGroupId).

Note: Users with the Ad hoc role are excluded from the statistics returned by this API endpoint.

Supported roles and conditions

This API endpoint supports the following Cocoon Data user roles (as described in the Organisation Administrator's Guide):

  • Organisation administrator - when this user is a member of the organisation whose ID is specified by {orgGroupId} 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.

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.

For successful requests only, a JSON-formatted response containing the following members is also returned:

  • originatorCount - The number of Cocoon Data user accounts within this organisation (specified by {orgGroupId} in the request's URL) that has the Originator role.
  • collaboratorCount - The number of Cocoon Data user accounts within this organisation that has the Collaborator role.
  • organisationAdminCount - The number of Cocoon Data user accounts within this organisation that has the Organisation administrator role.
  • totalCount - The sum of the 'Count' values above - i.e. the total number of roles assigned to users within this organisation.
    Example (response):
    {
    "originatorCount": 1,
    "collaboratorCount": 1,
    "organisationAdminCount": 2,
    "totalCount": 4
    }