Ana içeriğe geç

List Consumer Organizations

Endpoint​

GET /apiops/projects/{projectName}/consumer-organizations

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request​

Query Parameters​

ParameterTypeRequiredDescription
searchstringNoCase-insensitive contains-match on code and default name
pageintegerNoZero-based page index. Default 0
sizeintegerNoRows per page. Default 20, capped at 200
sortstringNofield,asc or field,desc. Fields: code, nameDefault. Default code,asc

Response​

200 OK with the paged envelope. Each item is an organization:

FieldTypeDescription
codestringCode of the organization. Unique in the project. Immutable
nameDefaultstringDefault display name
nameSecondarystringSecondary display name
parentOrganizationCodestringCode of the parent organization. Absent for a top-level organization
metadataarrayCustom metadata entries. The value of a secret entry is omitted

cURL Example​

curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/consumer-organizations?search=acme" \
-H "Authorization: Bearer YOUR_TOKEN"

Permissions​

  • User must have IDENTITY + VIEW permission in the project
  • A project outside the scope of the caller answers 404 resourceNotFound, never 403
  • The admin project has no consumer organizations: a call on it answers 400 malformedRequest (params.reason = platformScopeNotSupported)