> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Service Accounts

> List all service accounts in the organization.




## OpenAPI

````yaml en/API/Management-API.yaml GET /service-accounts
openapi: 3.1.0
info:
  title: CData Connect AI Management API
  version: v1
  description: >
    The Connect AI Management API provides programmatic control over enterprise
    platform administration. Base path: /api/v1/admin. Use it to manage users,
    service accounts, roles, and resource permissions without manual UI
    operations. The API follows OAS 3.0 standards with OAuth 2.0 scoped
    authentication.

    On versioning: the version prefix is incremented when breaking changes
    require it. A new /api/v2/admin path will be introduced with a 6-month
    deprecation notice before any v1 endpoint is retired.

    On human users vs. service accounts: human users are provisioned and
    lifecycle-managed by SCIM; the Management API handles direct overrides and
    atomic deprovisioning. Service accounts (CI/CD pipelines, IaC tooling,
    Terraform) are fully managed via the Management API and are not SCIM-owned.
servers:
  - url: https://cloud.cdata.com/api/v1/admin
    description: Production base URL
security:
  - oauth2: []
tags:
  - name: Users
    description: >
      Lifecycle management for human users: create, update, deprovision, and
      manage direct role assignments, workspace-scoped roles, and direct
      resource permissions. SCIM handles group-based provisioning and user
      creation at scale; this API handles direct overrides and atomic
      deprovisioning.
  - name: Service Accounts
    description: >
      Full lifecycle management for machine identities (CI/CD pipelines, IaC
      tooling, Terraform automation). Service accounts are not SCIM-owned and
      authenticate via OAuth 2.0 client credentials using the `client_id`
      returned on creation.
paths:
  /service-accounts:
    get:
      tags:
        - Service Accounts
      summary: List Service Accounts
      description: |
        List all service accounts in the organization.
      operationId: listServiceAccounts
      parameters:
        - name: status
          in: query
          description: Filter by status.
          schema:
            type: string
            enum:
              - active
              - deactivated
        - name: role_id
          in: query
          description: >-
            Filter to service accounts that hold a specific role (direct
            assignments only).
          schema:
            type: string
            format: uuid
        - name: limit
          in: query
          description: Maximum number of results to return per page.
          schema:
            type: integer
            default: 20
            maximum: 100
        - name: cursor
          in: query
          description: Pagination cursor from `next_cursor` in the previous response.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountCollection'
              example:
                items:
                  - id: c3d4e5f6-a7b8-9012-cdef-123456789012
                    name: pipeline-deploy-prod
                    description: Terraform deployment pipeline for production
                    status: active
                    client_id: d4e5f6a7-b8c9-0123-defa-234567890123
                    external_id: null
                    created_at: '2026-06-01T08:00:00Z'
                    created_by: 00000000-0000-0000-0000-000000000001
                limit: 20
                next_cursor: null
      security:
        - oauth2:
            - management:service-accounts:read
components:
  schemas:
    ServiceAccountCollection:
      allOf:
        - $ref: '#/components/schemas/CollectionEnvelope'
        - type: object
          properties:
            items:
              type: array
              items:
                $ref: '#/components/schemas/ServiceAccount'
    CollectionEnvelope:
      type: object
      properties:
        limit:
          type: integer
          description: Maximum number of items per page as requested.
        next_cursor:
          type: string
          nullable: true
          description: >-
            Pagination cursor for the next page. null when no further pages
            exist. Total count is not returned.
    ServiceAccount:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Service account identifier.
        name:
          type: string
          description: Unique display name within the organization.
        description:
          type: string
          nullable: true
          description: Optional free-text description of the service account.
        status:
          type: string
          enum:
            - active
            - deactivated
          description: Current lifecycle state of the service account.
        client_id:
          type: string
          format: uuid
          description: >-
            Auto-generated. Used for OAuth 2.0 client credentials
            authentication.
        external_id:
          type: string
          nullable: true
          description: Idempotency key supplied by the calling system.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 UTC.
        created_by:
          type: string
          format: uuid
          description: User ID of the creator.
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://cloud-login.cdata.com/oauth/token
          scopes:
            management:users:read: Read access to user resources.
            management:users:write: Write access to user resources.
            management:service-accounts:read: Read access to service account resources.
            management:service-accounts:write: Write access to service account resources.

````