curl --request GET \
--url https://auth.cognite.com/api/v1/orgs/{org}/principals{
"items": [
{
"id": "5yAFQRAATb7vtWGp4gvbJD3wE7VS81CGuQ7EZT",
"type": "SERVICE_ACCOUNT",
"name": "My service account",
"createdBy": {
"orgId": "my-org",
"userId": "-user-string-id-aBc123"
},
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"pictureUrl": "<string>",
"externalId": "my.known.id",
"description": "This is a service account used by data pipeline A-xxx"
}
],
"nextCursor": {
"cursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}
}List principals in an organization.
All principal types are supported.
Requires the caller to be logged into the target organization, or to be an admin in any of its the ancestor organizations.
curl --request GET \
--url https://auth.cognite.com/api/v1/orgs/{org}/principals{
"items": [
{
"id": "5yAFQRAATb7vtWGp4gvbJD3wE7VS81CGuQ7EZT",
"type": "SERVICE_ACCOUNT",
"name": "My service account",
"createdBy": {
"orgId": "my-org",
"userId": "-user-string-id-aBc123"
},
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"pictureUrl": "<string>",
"externalId": "my.known.id",
"description": "This is a service account used by data pipeline A-xxx"
}
],
"nextCursor": {
"cursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}
}ID of an organization The ID of an organization
3 - 64^([a-z][a-z0-9-]{1,62}[a-z0-9])$"my-org"
Cursor for paging through results. In general, if a response contains a nextCursor
property, it means that there may be more results, and you should pass that value as the
cursor parameter in the next request.
Note that the cursor may or may not be encrypted, but either way, it is not intended to be decoded. Its internal structure is not a part of the public API, and may change without notice. You should treat it as an opaque string and not attempt to craft your own cursors.
"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
1 <= x <= 100Filter by principal types. If not specified, all principal types will be included. You can filter by multiple types by providing a comma-separated list, or by repeating the parameter. The type of a principal
SERVICE_ACCOUNT, USER A list of principals, with a cursor pointing to the next results page (if any).
A principal
Show child attributes
Cursor for paging through results. In general, if a response contains a nextCursor
property, it means that there may be more results, and you should pass that value as the
cursor parameter in the next request.
Note that the cursor may or may not be encrypted, but either way, it is not intended to be decoded. Its internal structure is not a part of the public API, and may change without notice. You should treat it as an opaque string and not attempt to craft your own cursors.
Show child attributes
Was this page helpful?