{
  "opencollection": "1.0.0",
  "info": {
    "name": "CockroachDB Cloud APIKeys ServiceAccounts API",
    "version": "2024-09-16"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "ServiceAccounts",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List service accounts",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://cockroachlabs.cloud/api/v1/service-accounts",
            "params": [
              {
                "name": "pagination.page",
                "value": "",
                "type": "query",
                "description": "Page number for paginated results, starting from 1."
              },
              {
                "name": "pagination.limit",
                "value": "",
                "type": "query",
                "description": "Maximum number of results to return per page."
              },
              {
                "name": "pagination.as_of_time",
                "value": "",
                "type": "query",
                "description": "RFC3339 timestamp to return results as they were at a specific point in time (time-travel query)."
              },
              {
                "name": "pagination.sort_order",
                "value": "",
                "type": "query",
                "description": "Sort direction for paginated results. Accepted values are ASC and DESC."
              }
            ]
          },
          "docs": "Returns a list of service accounts in the organization. Supports pagination."
        },
        {
          "info": {
            "name": "Create a service account",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://cockroachlabs.cloud/api/v1/service-accounts",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new service account for machine-to-machine authentication. Requires ORG_ADMIN role."
        },
        {
          "info": {
            "name": "Get a service account",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://cockroachlabs.cloud/api/v1/service-accounts/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the resource."
              }
            ]
          },
          "docs": "Retrieves details of a specific service account by ID."
        },
        {
          "info": {
            "name": "Update a service account",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://cockroachlabs.cloud/api/v1/service-accounts/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the resource."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the name or description of an existing service account. Requires ORG_ADMIN role."
        },
        {
          "info": {
            "name": "Delete a service account",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://cockroachlabs.cloud/api/v1/service-accounts/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of the resource."
              }
            ]
          },
          "docs": "Permanently deletes a service account by ID. All associated API keys are also revoked. Requires ORG_ADMIN role."
        }
      ]
    }
  ],
  "bundled": true
}