---
updatedAt: 2025-08-22T22:28:02.000Z
agentTools:
  projectIndex: https://docs.cloudzero.com/llms.txt
---

# /v2/costformation/definition/versions/{version}

Get a CloudZero CostFormation Definition Version

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "version": "2.0.0",
    "title": "CloudZero API V2 Resources",
    "description": "CloudZero V2 API",
    "contact": {
      "name": "CloudZero Support",
      "url": "https://www.cloudzero.com/contact",
      "email": "support@cloudzero.com"
    },
    "license": {
      "name": "BSD 3",
      "identifier": "BSD-3"
    }
  },
  "servers": [
    {
      "url": "https://api.cloudzero.com"
    }
  ],
  "tags": [
    {
      "name": "costformation",
      "description": "CloudZero CostFormation Resources"
    }
  ],
  "paths": {
    "/v2/costformation/definition/versions/{version}": {
      "get": {
        "operationId": "getOneCostFormationDefinitionVersion",
        "description": "Get a CloudZero CostFormation Definition Version",
        "tags": [
          "costformation"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/cloudzero_idempotency_key"
          },
          {
            "$ref": "#/components/parameters/cloudzero_test_key"
          },
          {
            "$ref": "#/components/parameters/costformation_definition_version"
          },
          {
            "$ref": "#/components/parameters/costformation_namespace"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "$ref": "#/components/schemas/costformation_definition_version_with_url"
                    }
                  }
                },
                "example": {
                  "version": {
                    "version": "3",
                    "last_updated": "1710864000",
                    "last_updated_by": "api-key-id-abc123",
                    "uri": "https://example-presigned-url.s3.amazonaws.com/versions/3/definition.cfdl?X-Amz-Signature=abcdef123456"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequestError"
          },
          "403": {
            "$ref": "#/components/responses/forbiddenError"
          },
          "422": {
            "$ref": "#/components/responses/invalidCostFormationNamespaceError"
          }
        },
        "security": [
          {
            "APIKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "cloudzero_test_key": {
        "description": "If passed, the operation executes in the namespace specified by this key.\nResource mutations in the namespace last for 1 hour.\n",
        "name": "cloudzero-test-key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "cloudzero_idempotency_key": {
        "description": "If passed, any subsequent operation with the same value for this header will return the exact same result.\nThis is true for all responses, i.e. successes and errors.\n",
        "name": "cloudzero-idempotency-key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "costformation_definition_version": {
        "description": "Unique CloudZero CostFormation Definition Version; `latest` is as an alias for the most recent version.\n",
        "name": "version",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "costformation_namespace": {
        "description": "If using namespaced multi-file CloudZero CostFormation, specify the namespace to interact with.\n",
        "name": "namespace",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "forbiddenError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            }
          }
        }
      },
      "badRequestError": {
        "description": "Bad Request Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "$ref": "#/components/schemas/error"
                }
              }
            }
          }
        }
      },
      "invalidCostFormationNamespaceError": {
        "description": "Invalid CloudZero CostFormation Namespace Format Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "$ref": "#/components/schemas/costformation_invalid_namespace_error"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "epoch": {
        "description": "String representation of an epoch (UTC timestamp)",
        "type": "string",
        "pattern": "^\\d+(\\.\\d{1,})?$"
      },
      "with_uri": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string",
            "format": "uri",
            "example": "https://example-presigned-url.s3.amazonaws.com/versions/3/definition.cfdl?X-Amz-Signature=abcdef123456"
          }
        },
        "required": [
          "uri"
        ]
      },
      "with_version": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "example": "3"
          }
        },
        "required": [
          "version"
        ]
      },
      "with_last_updated_opt": {
        "type": "object",
        "properties": {
          "last_updated": {
            "description": "UTC timestamp for the last update of this entity",
            "$ref": "#/components/schemas/epoch",
            "example": "1710864000"
          }
        }
      },
      "with_last_updated_by_opt": {
        "type": "object",
        "properties": {
          "last_updated_by": {
            "description": "email, username, or api key that created this entity (optional)",
            "type": "string",
            "example": "api-key-id-abc123"
          }
        }
      },
      "costformation_definition_version": {
        "allOf": [
          {
            "$ref": "#/components/schemas/with_version"
          },
          {
            "$ref": "#/components/schemas/with_last_updated_opt"
          },
          {
            "$ref": "#/components/schemas/with_last_updated_by_opt"
          }
        ]
      },
      "costformation_definition_version_with_url": {
        "allOf": [
          {
            "$ref": "#/components/schemas/costformation_definition_version"
          },
          {
            "$ref": "#/components/schemas/with_uri"
          }
        ]
      },
      "costformation_invalid_namespace_error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "APIKeyAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "x-readme": {}
}
```