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
Parameter | In | Type | Required / Optional | Description |
---|---|---|---|---|
instanceId | path | string | required | The ID of your Identity Cloud instance |
filter | query | string | optional | Filters the query results for organizations which match in one or more of the following attribute values: organizationId , name , domain |
limit | query | integer | optional | The maximum size limit of the offset-based pagination results. Default 20 |
offset | query | integer | optional | Offset-based pagination parameter to define start page. Default: 0 |
includeUserCount | query | boolean | optional | If 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.
Parameter | Type | Description |
---|---|---|
items | array of organizations | The collection of organizations |
_pagination | object | The pagination object. For more information, see Offset-based pagination. |
count | integer | The 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.