Skip to content

ListServiceAccounts

GET/api/v1/serviceaccounts

List the service accounts in this organization, one per API key.

Example request

curl \
-H "Authorization: Bearer ${OBLIQUE_API_KEY}" \
"https://us.oblique.security/api/v1/serviceaccounts"

Set OBLIQUE_API_KEY to your API key.

Query parameters

  • pageSizeinteger (int32)

    The maximum number of service accounts to return.

  • pageTokenstring

    A token to retrieve the next page of results.

  • showDeletedboolean

    Whether to include deleted service accounts in the response.

Response

200ListServiceAccountsResponse
  • serviceAccountsServiceAccount[]

    The service accounts that match the request.

    • namestring

      Assigned by Oblique. The name of the service account resource. This is an arbitrary string and does not have to match the user’s name.

    • displayNamestringrequired

      The display name of the service account.

    • apiKeystringread-only

      The API key of the service account. This is only returned once during the CreateServiceAccount call, and is not available after that. API keys use the format obl-svc-[0-9a-fA-F_\-]+.

      To use a service account, provide it as a bearer token in the Authorization header: Authorization: Bearer <api_key>.

    • apiKeyOpaquestringread-only

      A safe version of the API key that is always returned and can be displayed to users. This replaces a significant portion of the API key with asterisks, and can be used to identify the service account without using the key itself.

    • createTimestring (date-time)read-only

      The time the service account was created.

    • updateTimestring (date-time)read-only

      The time the service account was last updated.

    • deleteTimestring (date-time)read-only

      The time the service account was deleted, effectively revoking it.

    • lastUsedTimestring (date-time)read-only

      The time the service account was successfully used. This does not include requests that are blocked by the service account’s permissions.

    • creatorKindstringread-only
      Allowed values: USER, SYSTEM

      The kind of the creator of the service account.

    • creatorstringread-only

      The creator of the service account. Will only be present if creator_kind is USER.

      Format: users/{user}

    • permissionsstringrequired
      Allowed values: READ, READ_WRITE
  • nextPageTokenstring

    A token to retrieve the next page of results.

Errors

StatusMeaning
400Malformed request
401Missing or invalid API key
403Not allowed for this API key
404Not found
429Too many requests
500Internal server error