v1

latestOpenAPI 3.0.12026-07-26152262362.2 KB
PS4Commitments AWS

List AWS planned purchases

Returns the laddering projections for the MPA — one item per available purchases-projection document (typically compute and/or database; up to four product lines as PS4C expands).

With no filters, returns all existing projection documents for the payer account in stable product-line order (compute, then database, then any future lines in enum order). When a filtered product line has no projection document, the response is an empty items array (not 404). Partial projection documents return only the fields available in storage.

404 is returned only when the payer account does not exist or the caller cannot access it. A payer account that is not onboarded for PS4C still returns 200 with an empty items array when no projection documents exist — use GET /ps4commitments/v1/aws/payer-accounts (or get-by-id) for onboardingStatus.

Pagination: results are returned in stable product-line order (compute, then database, then any future lines in enum order). Use maxResults to limit page size (default 50, max 500). When more items remain, the response includes a non-null pageToken; pass it unchanged on the next request with the same query parameters (service, maxResults). rowCount is the number of items in this page. An invalid pageToken returns 400 with code pagination_token_invalid; an expired token returns 400 with code pagination_token_expired.

get/ps4commitments/v1/aws/payer-accounts/{payerAccountId}/planned-purchases

Path parameters

payerAccountIdstring required
Example:123456789012

AWS Master Payer Account ID (12-digit AWS account number) that scopes the request.

Query parameters

service'compute' | 'database'

Filter by PS4C product line (AWS planned purchases).

pageTokenstring

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.

maxResultsinteger

Maximum number of items to return. Server may return fewer. Defaults to 50; maximum 500.

Headers

X-Tenant-Idstring
Example:Kp2mN8qL4vR0sT1wX3yZ

Tenant (customer) identifier that conveys the tenant scope for the request (DoiT API Design Standards §15).

Resolution when the header is absent:

  • A key scoped to exactly one tenant resolves to that tenant automatically; the header is optional.
  • A principal that can access more than one tenant (e.g. DoiT-employee keys) must supply the header. Without it the request is rejected with 400 and code tenant_id_required — the server does not guess across tenant scopes.

When the header is present but conflicts with the tenant the key is scoped to, the request is rejected with 400 and code tenant_id_mismatch.

Response

Paginated list of planned purchase projections.

pageTokenstring nullable
rowCountinteger required

Number of items in items for this response.

Example response

{
  "items": [
    {
      "finalCommitment": {
        "currency": "USD"
      },
      "estimatedSavings": {
        "currency": "USD"
      },
      "steps": [
        {
          "purchaseAmount": {
            "currency": "USD"
          },
          "cumulativeCommitment": {
            "currency": "USD"
          },
          "estimatedSavings": {
            "currency": "USD"
          }
        }
      ]
    }
  ]
}