---
updatedAt: 2026-07-22T13:02:30.000Z
agentTools:
  projectIndex: https://developer.doit.com/llms.txt
---

# Retrieve a commitment

Returns a commitment by the specified Id.

# 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": "Commitment Manager",
      "description": "View and manage commitment contracts with DoiT."
    }
  ],
  "paths": {
    "/analytics/v1/commitment-manager/{id}": {
      "get": {
        "tags": [
          "Commitment Manager"
        ],
        "summary": "Retrieve a commitment",
        "description": "Returns a commitment by the specified Id.",
        "operationId": "getCommitment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Commitment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK - Commitment returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommitmentExternal"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Standard error response structure.",
        "properties": {
          "error": {
            "type": "string",
            "description": "Detailed error message."
          }
        },
        "example": {
          "error": "The request could not be completed."
        }
      },
      "CommitmentExternal": {
        "type": "object",
        "description": "A commitment contract.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the commitment."
          },
          "name": {
            "type": "string",
            "description": "The name of the commitment."
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "example": "2024-03-10T23:00:00Z",
            "description": "The start date of the commitment."
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "example": "2024-03-10T23:00:00Z",
            "description": "The end date of the commitment."
          },
          "currency": {
            "type": "string",
            "description": "The currency of the commitment (e.g., USD).",
            "example": "USD"
          },
          "cloudProvider": {
            "type": "string",
            "description": "The cloud provider associated with the commitment.",
            "enum": [
              "google-cloud",
              "amazon-web-services",
              "microsoft-azure"
            ]
          },
          "totalCommitmentValue": {
            "type": "number",
            "format": "double",
            "description": "The total value of the commitment across all periods."
          },
          "totalCurrentAttainment": {
            "type": "number",
            "format": "double",
            "description": "The total attained spend across all periods, on a cash basis. This is eligible spend (including capped marketplace spend and credits) plus adjustments. Rollover between periods is excluded, so excess or shortfall carried into a later period is not counted again; each period's carried amount is reported separately in `periods[].rolloverFromPrevPeriod`. Equals the sum of `periods[].cashAttainment`."
          },
          "totalMarketplaceSpend": {
            "type": "number",
            "format": "double",
            "description": "The total marketplace spend across all periods."
          },
          "totalForecastValue": {
            "type": "number",
            "format": "double",
            "description": "The total projected spend at the end of the commitment, summed across all periods. 0 when insufficient history is available to compute a forecast."
          },
          "periods": {
            "type": "array",
            "description": "The list of commitment periods.",
            "items": {
              "$ref": "#/components/schemas/CommitmentPeriod"
            }
          },
          "createTime": {
            "type": "integer",
            "format": "int64",
            "description": "The creation time in milliseconds since epoch."
          },
          "updateTime": {
            "type": "integer",
            "format": "int64",
            "description": "The last update time in milliseconds since epoch."
          }
        }
      },
      "CommitmentPeriod": {
        "type": "object",
        "description": "A single period within a commitment.",
        "properties": {
          "startDate": {
            "type": "string",
            "format": "date-time",
            "example": "2024-03-10T23:00:00Z",
            "description": "The start date of the period."
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "example": "2024-03-10T23:00:00Z",
            "description": "The end date of the period."
          },
          "commitmentValue": {
            "type": "number",
            "format": "double",
            "description": "The commitment value for this period."
          },
          "marketplaceLimitPercentage": {
            "type": "number",
            "format": "double",
            "description": "The marketplace limit as a percentage (0-100)."
          },
          "marketplaceSpend": {
            "type": "number",
            "format": "double",
            "description": "The marketplace spend within this period."
          },
          "marketplaceLimitAmount": {
            "type": "number",
            "format": "double",
            "description": "The marketplace limit in absolute currency for this period, derived as commitmentValue * marketplaceLimitPercentage / 100."
          },
          "forecastValue": {
            "type": "number",
            "format": "double",
            "description": "The projected spend at the end of this period, based on a linear regression over the period's total spend series. 0 when insufficient history is available to compute a forecast."
          },
          "cashAttainment": {
            "type": "number",
            "format": "double",
            "description": "This period's own attained spend, on a cash basis. This is eligible spend (including capped marketplace spend and credits) plus adjustments, excluding anything carried in from the previous period. Summed across periods it equals `totalCurrentAttainment`. To measure the period against its `commitmentValue` the way the console does, use `cashAttainment + rolloverFromPrevPeriod + shortfallRollover`; the period's remaining amount is `commitmentValue` minus that. Excess carried out to the next period is not deducted from this period."
          },
          "rolloverFromPrevPeriod": {
            "type": "number",
            "format": "double",
            "description": "The amount carried into this period from the previous period under the commitment's rollover terms. Positive for excess rollover, negative for shortfall rollover, 0 when nothing was carried (always 0 for the first period). amazon-web-services commitments no longer roll over, so this is 0 for them unless the commitment was last calculated before that change. Not included in `cashAttainment` or `totalCurrentAttainment`."
          },
          "shortfallRollover": {
            "type": "number",
            "format": "double",
            "description": "The part of this period's shortfall carried forward to the next period under the commitment's shortfall rollover terms, where it appears as a negative `rolloverFromPrevPeriod`. 0 when nothing was carried forward, including while the period is still open and for the last period. The console counts this amount as met within this period. Not included in `cashAttainment` or `totalCurrentAttainment`."
          }
        }
      }
    },
    "responses": {
      "400": {
        "description": "Bad Request - The server cannot process the request, often due to a malformed request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized - Invalid API key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "403": {
        "description": "Forbidden - The client is not authorized to perform the request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "404": {
        "description": "Not Found - The requested resource does not exist.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "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"
      }
    }
  },
  "x-samples-languages": [
    "curl",
    "go",
    "node",
    "python"
  ],
  "x-cli-config": {
    "security": "oauth2",
    "params": {
      "client_id": "cli"
    }
  }
}
```