Usage Metrics API - Teams & Users

Programmatic access to usage metrics across an organization

The Usage API (released with 5.18.0) provides programmatic access to usage metrics across an organization. It complements existing enterprise reporting options—UI-based usage reports and CSV exports—by enabling integration into internal dashboards and tools via API.

The Usage API is available to all Enterprise customers on both Enterprise SaaS (console.tabnine.com) and Private Installations.

The APIs return JSON with parameter details and example responses.

List of Implemented APIs

APIs return JSON with parameter details and example responses:

Team-Level Info APIs

  1. GET users of a given team

  2. GET current utilization info

  3. GET teamId

  4. GET team-wide usage

User-Level Info APIs

  1. GET userId

  2. GET usage

Team-Level

Get users of a given team

GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
teamIdstringRequired
Query parameters
offsetintegerRequired

Skips a number of items before starting to return results.

limitintegerRequired

Maximum number of items to return.

Responses
chevron-right
200

Successful response with users for the team.

application/json
GET
/api/v1/team/{teamId}/users

Get current team utilization info

GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
teamIdstringRequired
Responses
chevron-right
200

Successful response with team utilization counts.

application/json
registeredintegerRequired
deactivatedintegerRequired
invitedintegerRequired
GET
/api/v1/team/account-utilizations

Get team name

GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
teamIdstringRequired
Responses
chevron-right
200

Successful response with team info.

application/json
idstringRequired
namestringRequired
GET
/api/v1/team/{teamId}

Team-level usage

GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
organizationIdstringRequired
teamIdstringRequired
fromstring · date-timeRequired

Filter usage data from this date (ISO 8601).

tostring · date-timeRequired

Filter usage data until this date (ISO 8601).

granularitystring · enumRequired

Time resolution at which usage data is aggregated and returned.

Possible values:
Responses
chevron-right
200

Successful response with team usage data.

application/json
organizationIdstringRequired
teamIdstringRequired
fromstring · date-timeRequired
tostring · date-timeRequired
GET
/api/v1/team/usage

User-Level

User-level info

GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
user_idstringRequired
Responses
chevron-right
200

Successful response with user info.

application/json
GET
/api/v1/user/{user_id}

User-level usage

GET
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
organizationIdstringRequired
userIdstringRequired
fromstring · date-timeRequired

Filter usage data from this date (ISO 8601).

tostring · date-timeRequired

Filter usage data until this date (ISO 8601).

granularitystring · enumRequired

Time resolution at which usage data is aggregated and returned.

Possible values:
Responses
chevron-right
200

Successful response with user usage data.

application/json
organizationIdstringRequired
userIdstringRequired
fromstring · date-timeRequired
tostring · date-timeRequired
GET
/api/v1/user/usage

Last updated

Was this helpful?