Skip to main content

Query organizations

The endpoint provides support to search for organizations based on provided query parameters.

HTTP request

GET https://$instanceId.id.nevis.cloud/nevis/api/v1/query/organizations?{queryParameters}

Parameters

ParameterInTypeRequired / OptionalDescription
instanceIdpathstringrequiredThe ID of your Identity Cloud instance
filterquerystringoptionalFilters the query results for organizations which match in one or more of the following attribute values: organizationId, name, domain
limitqueryintegeroptionalThe maximum size limit of the offset-based pagination results. Default 20
offsetqueryintegeroptionalOffset-based pagination parameter to define start page. Default: 0
includeUserCountquerybooleanoptionalIf the value is true the number of users assigned to the organization is included in the response Default false

Example request

curl "https://$instanceId.id.nevis.cloud/nevis/api/v1/query/organizations?offset=0&limit=10&includeUserCount=true" \
--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 Offset-based pagination.
countintegerThe number of the found items.

Example response

{
"count": 2,
"items": [
{
"organizationId": "c08937fa-38c1-4551-bb21-0fddf2682309",
"userCount": 1,
"domain": "test.org",
"name": "Test Organization",
"organizationState": "active"
},
{
"organizationId": "f661e955-cd0d-4ca0-b6a4-a0c14c312a18",
"userCount": 0,
"domain": "example.com",
"name": "Example organization",
"organizationState": "active"
}
],
"_pagination": {
"offset": 0,
"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.