Get organizations
The endpoint provides support to get all organizations based on provided query parameters.
HTTP request
GET https://$instanceId.id.nevis.cloud/nevis/api/v1/organizations?{queryParameters}
Parameters
Parameter | In | Type | Required / Optional | Description |
---|---|---|---|---|
instanceId | path | string | required | The ID of your Identity Cloud instance |
includeUserCount | query | boolean | optional | If the value is true the number of users assigned to the organization is included in the response Default false |
limit | query | integer | optional | The maximum size limit of the token-based pagination results Default 1000 |
continuationToken | query | string | optional | The token to retrieve the next set of the token-based pagination results |
Example request
curl "https://$instanceId.id.nevis.cloud/nevis/api/v1/organizations?includeUserCount=true&limit=10" \
--header "Authorization: Bearer $accessKey"
HTTP response
On success
HTTP/1.1 200
is returned on success.
Parameter | Type | Description |
---|---|---|
items | array of organizations | The collection of organizations |
_pagination | object | The pagination object. For more information, see Token-based pagination. |
Example response
{
"items": [
{
"organizationId": "f789cf61-68b6-4356-a09d-4e3546aecceb",
"userCount": 1,
"domain": "test.org",
"name": "Test Organization",
"organizationState": "active"
},
{
"organizationId": "6dbcb481-3b04-4c4d-b515-8ba6eabeae20",
"userCount": 0,
"domain": "example.com",
"name": "Example organization",
"organizationState": "active"
}
],
"_pagination": {
"continuationToken": "dfa3adac-654b-4ea5-9384-0b0507ec62c2",
"limit": 10
}
}
On failure
HTTP/1.1 401
is returned if the authorization fails due to an invalid access key.
HTTP/1.1 422
is returned if invalid query parameters are given.
HTTP/1.1 500
is returned if an unexpected error occurs.