List service accounts
Reviewed on · View on GitHub
You can obtain the list of service accounts at the organization level or at the space level.
The presence of the words spaces or organization in the URL distinguishes the two requests.
Permissions
This action requires the following IAM (Identity and Access Management) permissions:
- iam.serviceAccount.get
- Console
- API
- Terraform

-
Log in to the Numspot console
-
From the left-hand side menu, click IAM → Service accounts
-
You are redirected to the list of Service accounts
List service accounts in an organization
Example request
curl 'https://api.{region}.numspot.com/iam/organisations/{organisationId}/serviceAccounts'
Example response with curl
{
"nextPageToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"totalSize": 150,
"items": [
{
"name": "…",
"id": "…",
"tokenDuration": "…",
"expirationDate": "…"
}
]
}
See the page on using the API for the implementation.
List service accounts in a space
Example request
curl 'https://api.{region}.numspot.com/iam/spaces/{spaceId}/serviceAccounts'
Response
Example with curl
{
"nextPageToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"totalSize": 150,
"items": [
{
"name": "…",
"id": "…",
"tokenDuration": "…",
"expirationDate": "…"
}
]
}
See the page on using the API for the implementation.
The Terraform documentation is available on the Numspot registry ↗.