Skip to main content
GET
Get Workforce Trainings Unique Values
← Own Workforce API Return the distinct values of one filterable field on training records, each with a label and the number of rows carrying it. It populates the file filter on the training list without paging the whole list first.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Query Parameters

string
required
The field to enumerate.Available values: file_idAny other value is rejected with 422.Example: field=file_id

Response

string
Echo of the field that was queried
integer
Number of distinct values returned
array[object]

Example

Successful Response

Common Errors

401 Unauthorized

Cause: the key is invalid, or it does not belong to the organization in x-organization-id — the two are looked up as a pair. A request carrying no credentials at all answers AUTH_REQUIRED instead.

403 Forbidden

Cause: the key’s owner is not an enabled member of the organization in x-organization-id.

422 Unprocessable Entity

Cause: field missing, or set to something other than file_id.

List trainings paginated

Apply the value as file_id[]

Employee unique values

The same endpoint for employees