{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/cockroach-labs/main/json-schema/cockroach-labs-list-service-accounts-response-schema.json",
  "title": "ListServiceAccountsResponse",
  "description": "Paginated list of service accounts.",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cockroach-labs-service-accounts-api-openapi.yml#/components/schemas/ListServiceAccountsResponse",
  "type": "object",
  "properties": {
    "service_accounts": {
      "type": "array",
      "description": "Array of service account objects.",
      "items": {
        "$ref": "#/$defs/ServiceAccount"
      }
    },
    "pagination": {
      "$ref": "#/$defs/PaginationResponse"
    }
  },
  "$defs": {
    "PaginationResponse": {
      "type": "object",
      "description": "Pagination metadata included in list responses.",
      "properties": {
        "next": {
          "type": "string",
          "description": "Token or cursor for retrieving the next page of results."
        },
        "last": {
          "type": "string",
          "description": "Token or cursor for the last page of results."
        },
        "time": {
          "type": "string",
          "format": "date-time",
          "description": "Server time at which the paginated query was executed."
        }
      }
    },
    "ServiceAccount": {
      "type": "object",
      "description": "A service account used for machine-to-machine authentication within a CockroachDB Cloud organization.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of the service account."
        },
        "name": {
          "type": "string",
          "description": "Name of the service account."
        },
        "description": {
          "type": "string",
          "description": "Description of the service account's purpose."
        },
        "creator_id": {
          "type": "string",
          "description": "User ID of the account creator."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the service account was created."
        }
      }
    }
  }
}