Skip to main content

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

ParameterInTypeRequired / OptionalDescription
instanceIdpathstringrequiredThe ID of your Identity Cloud instance
includeUserCountquerybooleanoptionalIf the value is true the number of users assigned to the organization is included in the response Default false
limitqueryintegeroptionalThe maximum size limit of the token-based pagination results Default 1000
continuationTokenquerystringoptionalThe 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.

ParameterTypeDescription
itemsarray of organizationsThe collection of organizations
_paginationobjectThe 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.