---
updatedAt: 2026-09-09T12:37:08.000Z
agentTools:
  projectIndex: https://developer.doit.com/llms.txt
---

# List billing account engine settings

Returns one item per onboarded GCP Billing Account. Each item includes that billing
account's recommendation and automation engine settings for each product line activated
on it, per region scope: one `global` entry for `compute`, and one entry per known region
for `cloud_sql`.

Cloud SQL regions come from the billing account's persisted settings: a region is added
when eligible spend is first seen there and is never removed, so its settings entry
remains listed even if spend later drops to zero. Items are sorted by
`billingAccountId`; within an item, `services` lists `compute` before `cloud_sql`, with
`cloud_sql` regions sorted alphabetically.

Settings are stored independently on each billing account. Existing customer-level
settings are copied lazily when an account is first read or initialized; if no valid
legacy value exists, the complete backend defaults are materialized once on the account.
Only product lines that are activated/onboarded for a given billing account are returned.

In the DoiT Console, these settings are edited on an account's Settings tab.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "DoiT Cloud Intelligence",
    "description": "Programmatic access to DoiT Platform",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.doit.com"
    }
  ],
  "security": [
    {
      "api_key": []
    },
    {
      "tenantId": [],
      "api_key": []
    }
  ],
  "tags": [
    {
      "name": "PerfectScale for Commitments GCP",
      "description": "Evaluate current GCP commitments, plan and automate purchases, and optimize cloud costs with PerfectScale for Commitments."
    }
  ],
  "paths": {
    "/ps4commitments/v1/gcp/settings": {
      "get": {
        "operationId": "listGcpBillingAccountsSettings",
        "tags": [
          "PerfectScale for Commitments GCP"
        ],
        "summary": "List billing account engine settings",
        "description": "Returns one item per onboarded GCP Billing Account. Each item includes that billing\naccount's recommendation and automation engine settings for each product line activated\non it, per region scope: one `global` entry for `compute`, and one entry per known region\nfor `cloud_sql`.\n\nCloud SQL regions come from the billing account's persisted settings: a region is added\nwhen eligible spend is first seen there and is never removed, so its settings entry\nremains listed even if spend later drops to zero. Items are sorted by\n`billingAccountId`; within an item, `services` lists `compute` before `cloud_sql`, with\n`cloud_sql` regions sorted alphabetically.\n\nSettings are stored independently on each billing account. Existing customer-level\nsettings are copied lazily when an account is first read or initialized; if no valid\nlegacy value exists, the complete backend defaults are materialized once on the account.\nOnly product lines that are activated/onboarded for a given billing account are returned.\n\nIn the DoiT Console, these settings are edited on an account's Settings tab.",
        "parameters": [
          {
            "$ref": "#/components/parameters/tenantId"
          },
          {
            "$ref": "#/components/parameters/ps4cPageToken"
          },
          {
            "$ref": "#/components/parameters/ps4cMaxResults"
          }
        ],
        "responses": {
          "200": {
            "description": "Settings payload for one onboarded GCP Billing Account, broken down by activated product line (`services[].settings`).",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Content-Language": {
                "$ref": "#/components/headers/ContentLanguage"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GcpBillingAccountSettingsItem"
                      }
                    },
                    "pageToken": {
                      "type": "string",
                      "description": "Opaque cursor for the next page. Absent when this is the last page.",
                      "nullable": true
                    },
                    "rowCount": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Number of items returned in this page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GcpRegion": {
        "type": "string",
        "pattern": "^(global|[a-z]+(_[a-z0-9]+)+)$",
        "description": "GCP region scope in the DCI `lower_snake_case` wire form (for example `us_east1`), or the\nliteral `global` for cross-region scopes. This is not the raw provider spelling (`us-east1`);\nthe same pattern applies to the `region` query parameter. Regions are discovery-driven, so the\nlist is open rather than an enum.",
        "example": "us_east1"
      },
      "GcpBillingAccountSettings": {
        "type": "object",
        "description": "Recommendation and automation engine settings for one product line on a GCP billing account.",
        "required": [
          "purchaseMode",
          "minimumCommitment",
          "lastDayOfMonthForPurchase",
          "maximumCommitment",
          "term",
          "policy"
        ],
        "properties": {
          "purchaseMode": {
            "type": "string",
            "enum": [
              "autonomous",
              "requires_approval"
            ],
            "description": "Whether purchases execute automatically or require customer approval before the planner proceeds. Configured in the DoiT Console Settings tab; this settings API is read-only.",
            "x-enumDescriptions": {
              "autonomous": "Purchases execute automatically within configured commitment limits. Set in the DoiT Console (Autonomous Purchasing).",
              "requires_approval": "Purchases wait for customer approval in the DoiT Console before execution. Default mode; set in Console Settings."
            }
          },
          "minimumCommitment": {
            "type": "number",
            "format": "double",
            "description": "Minimum hourly commitment amount (USD) per purchase step."
          },
          "lastDayOfMonthForPurchase": {
            "type": "integer",
            "description": "Latest calendar day of the month on which a purchase may be scheduled."
          },
          "maximumCommitment": {
            "type": "number",
            "format": "double",
            "description": "Maximum total hourly commitment (USD). `0` means no cap."
          },
          "term": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommitmentTerm"
              }
            ],
            "description": "Preferred commitment term length for new purchases."
          },
          "policy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommitmentPolicyId"
              }
            ],
            "description": "Coverage target policy for recommendations and purchases (built-in or customer-defined)."
          }
        }
      },
      "GcpBillingAccountServiceSettings": {
        "type": "object",
        "required": [
          "service",
          "region",
          "settings"
        ],
        "properties": {
          "service": {
            "type": "string",
            "enum": [
              "compute",
              "cloud_sql"
            ],
            "description": "Product line these settings apply to."
          },
          "region": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GcpRegion"
              }
            ],
            "description": "Region scope these settings apply to, in `lower_snake_case` wire form (for example `us_east1`). Always `global` for `compute`; always a concrete region (never `global`) for `cloud_sql`."
          },
          "settings": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GcpBillingAccountSettings"
              }
            ],
            "description": "Commitment settings for this product line and region."
          }
        }
      },
      "GcpBillingAccountSettingsItem": {
        "type": "object",
        "required": [
          "billingAccountId",
          "services"
        ],
        "properties": {
          "billingAccountId": {
            "type": "string",
            "description": "GCP Billing Account ID.",
            "example": "01D4A2-4E3F1B-9C72A0"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GcpBillingAccountServiceSettings"
            },
            "description": "Settings for each product line and region scope activated on this billing account, ordered `compute` first, then `cloud_sql` regions alphabetically."
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "instance",
          "code",
          "retryable"
        ],
        "additionalProperties": true,
        "description": "RFC 9457 Problem Details — standard DoiT error envelope for all non-2xx responses.",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "example": "https://developer.doit.com/errors/not_found"
          },
          "title": {
            "type": "string",
            "example": "Resource not found"
          },
          "status": {
            "type": "integer",
            "example": 404
          },
          "detail": {
            "type": "string",
            "example": "customer not found"
          },
          "instance": {
            "type": "string",
            "format": "uri",
            "example": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9"
          },
          "code": {
            "type": "string",
            "pattern": "^([a-z][a-z0-9_]*|[a-z][a-z0-9]*(?:-[a-z0-9]+)*\\.[a-z][a-z0-9_]*)$",
            "example": "not_found"
          },
          "retryable": {
            "type": "boolean",
            "example": false
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "issue"
              ],
              "properties": {
                "issue": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_]*$"
                },
                "field": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          },
          "docsUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true
          }
        }
      },
      "CommitmentTerm": {
        "type": "string",
        "enum": [
          "one_year",
          "three_year"
        ],
        "description": "Preferred or actual commitment term length for Savings Plans and related settings.",
        "x-enumDescriptions": {
          "one_year": "One-year commitment term.",
          "three_year": "Three-year commitment term."
        }
      },
      "CommitmentPolicyId": {
        "type": "string",
        "description": "ID of a commitment policy: either one of the built-in policies — `conservative` (lower\ncoverage target, ~65%), `balanced` (moderate, ~80%), `max_savings` (aggressive, ~90%) — or the\nID of a policy the customer defined in the DoiT Console. One catalog is shared by AWS and GCP,\nand the same policy may be assigned to any AWS organization or GCP billing account product\nline. Custom policies make this an open list, so it is not an enum; treat the value as an\nopaque identifier and use the commitment-policies endpoint to resolve it.",
        "example": "balanced"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Syntactically malformed request, missing required parameter, or unsupported parameter value.",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "validationFailed": {
                "summary": "Missing or invalid parameter",
                "value": {
                  "type": "https://developer.doit.com/errors/validation_failed",
                  "title": "Validation failed",
                  "status": 400,
                  "detail": "The request is missing a required parameter or contains an invalid value.",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "validation_failed",
                  "retryable": false
                }
              },
              "tenantIdRequired": {
                "summary": "Tenant scope not resolvable",
                "value": {
                  "type": "https://developer.doit.com/errors/tenant_id_required",
                  "title": "Tenant ID required",
                  "status": 400,
                  "detail": "X-Tenant-Id header is required when the credential can access more than one tenant.",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "tenant_id_required",
                  "retryable": false
                }
              },
              "tenantIdMismatch": {
                "summary": "Header conflicts with the key's tenant",
                "value": {
                  "type": "https://developer.doit.com/errors/tenant_id_mismatch",
                  "title": "Tenant ID mismatch",
                  "status": 400,
                  "detail": "X-Tenant-Id does not match the tenant the credential is scoped to.",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "tenant_id_mismatch",
                  "retryable": false
                }
              },
              "gcpServiceRequired": {
                "summary": "GCP region filter without commitment type",
                "value": {
                  "type": "https://developer.doit.com/errors/gcp_service_required",
                  "title": "GCP service required",
                  "status": 400,
                  "detail": "The region query parameter requires gcp_service.",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "gcp_service_required",
                  "retryable": false
                }
              },
              "paginationTokenInvalid": {
                "summary": "Structurally invalid pagination cursor",
                "value": {
                  "type": "https://developer.doit.com/errors/pagination_token_invalid",
                  "title": "Invalid pagination token",
                  "status": 400,
                  "detail": "The pageToken cursor is structurally invalid (decode failure or tampering).",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "pagination_token_invalid",
                  "retryable": false
                }
              },
              "paginationTokenExpired": {
                "summary": "Expired pagination cursor",
                "value": {
                  "type": "https://developer.doit.com/errors/pagination_token_expired",
                  "title": "Expired pagination token",
                  "status": 400,
                  "detail": "The pageToken cursor is no longer valid; restart pagination from the beginning.",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "pagination_token_expired",
                  "retryable": false
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid credentials.",
        "headers": {
          "WWW-Authenticate": {
            "description": "Bearer challenge per RFC 6750.",
            "schema": {
              "type": "string",
              "example": "Bearer realm=\"api.doit.com\""
            }
          },
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://developer.doit.com/errors/unauthorized",
              "title": "Unauthorized",
              "status": 401,
              "detail": "missing or invalid bearer token",
              "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
              "code": "unauthorized",
              "retryable": false
            }
          }
        }
      },
      "Forbidden": {
        "description": "Authenticated but not authorized to perform this request.",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://developer.doit.com/errors/forbidden",
              "title": "Forbidden",
              "status": 403,
              "detail": "caller does not have permission to access this customer's commitments",
              "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
              "code": "forbidden",
              "retryable": false
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Unexpected server error.",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://developer.doit.com/errors/internal_error",
              "title": "Internal server error",
              "status": 500,
              "detail": "an unexpected error occurred",
              "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
              "code": "internal_error",
              "retryable": true
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Service temporarily unavailable; retry after the indicated delay.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer",
              "example": 30
            }
          },
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://developer.doit.com/errors/service_unavailable",
              "title": "Service unavailable",
              "status": 503,
              "detail": "entitlement check temporarily unavailable",
              "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
              "code": "service_unavailable",
              "retryable": true
            }
          }
        }
      }
    },
    "parameters": {
      "tenantId": {
        "in": "header",
        "name": "X-Tenant-Id",
        "required": false,
        "description": "Customer (tenant) ID for the request. This is separate from authentication: you still pass your personal or service account API token in the `Authorization` header (`Bearer <token>`). See [Get Started](https://developer.doit.com/docs/start).\n\n**When to omit (most callers):** If your personal or service account token belongs to a single customer, omit this header. The API resolves that customer from the token.\n\n**When to send:** If your credential can access more than one customer, set `X-Tenant-Id` to the customer ID you want to act on. A service account can select an active direct or nested descendant of its home customer; the endpoint's normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns `403 Forbidden`. Prefer this header over the legacy `customerContext` query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.",
        "schema": {
          "type": "string",
          "example": "Kp2mN8qL4vR0sT1wX3yZ"
        }
      },
      "ps4cPageToken": {
        "in": "query",
        "name": "pageToken",
        "required": false,
        "description": "Opaque cursor token returned by a previous list response. Omit to start from the beginning; an empty or absent token in a response means there are no more results. Do not parse it. A structurally invalid cursor returns `400` with code `pagination_token_invalid`; an expired cursor returns `400` with code `pagination_token_expired` — restart pagination from the beginning.",
        "schema": {
          "type": "string"
        }
      },
      "ps4cMaxResults": {
        "in": "query",
        "name": "maxResults",
        "required": false,
        "description": "Maximum number of items to return. Server may return fewer. Defaults to 50; maximum 500.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 500,
          "default": 50
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "Authorization",
        "description": "Use the \"Bearer <API_KEY>\" format or sign in for autofill",
        "in": "header"
      },
      "tenantId": {
        "type": "apiKey",
        "name": "X-Tenant-Id",
        "description": "Customer (tenant) ID for the request. Separate from your API token: always authenticate with `Authorization: Bearer <token>` (personal or service account). See [Get Started](https://developer.doit.com/docs/start). Omit when your token is scoped to a single customer (resolved automatically). A service account can select an active direct or nested descendant of its home customer; the endpoint's normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns `403 Forbidden`. Prefer this header over the legacy `customerContext` query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.",
        "in": "header"
      }
    },
    "headers": {
      "RequestId": {
        "description": "DoiT request identifier for support and log correlation. Format `req_<ULID>`.",
        "schema": {
          "type": "string",
          "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$",
          "example": "req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9"
        }
      },
      "ContentLanguage": {
        "description": "Language of the response body. Always `en` for this API.",
        "schema": {
          "type": "string",
          "enum": [
            "en"
          ]
        }
      }
    }
  },
  "x-samples-languages": [
    "curl",
    "go",
    "node",
    "python"
  ],
  "x-cli-config": {
    "security": "oauth2",
    "params": {
      "client_id": "cli"
    }
  }
}
```