---
title: "GET /v2/costformation/definition/versions"
method: GET
path: "/v2/costformation/definition/versions"
tags: ["costformation"]
---

# GET /v2/costformation/definition/versions

`GET /v2/costformation/definition/versions`

Get a list of CloudZero CostFormation Definition Versions.

## Query parameters

- `limit` number
- `cursor` string
- `namespace` string
- `sort_key` 'version' — Sortable CloudZero CostFormation Definition Properties
- `sort_order` 'asc' | 'desc'

## Headers

- `cloudzero-idempotency-key` string
- `cloudzero-test-key` string

## Response `200`

Successful Operation

- object
  - `pagination` Pagination — Supports programmatic pagination
    - `page_count` integer
    - `item_count` integer
    - `total_count` integer
    - `cursor` object
      - `next_cursor` union
        - string
        - unknown
      - `previous_cursor` union
        - string
        - unknown
      - `has_next` boolean
      - `has_previous` boolean
  - `sorting` CostformationDefinitionVersionsSorting — This response key contains sorting options, where: - `available`: is an object with two keys: - `sort_keys`: list of available sort keys - `sort_orders`: list of available sort orders - `current`: is an array of `{sort_key: sort_order}` objects, the response is sorted in order of this array
    - `available` object
      - `sort_keys` CostformationDefinitionVersionsSortKeys[]
      - `sort_orders` SortOrder[]
    - `current` object[]
      - `sort_key` 'version' — Sortable CloudZero CostFormation Definition Properties
      - `sort_order` 'asc' | 'desc'
  - `filtering` CostformationDefinitionVersionsFiltering — unresolved $ref
  - `versions` CostformationDefinitionVersion[]
    - `version` string, required
    - `last_updated` string — String representation of an epoch (UTC timestamp)
    - `last_updated_by` string — email, username, or api key that created this entity (optional)

## Other responses

- `400` — Bad Request Error
- `403` — Forbidden
- `422` — Invalid CloudZero CostFormation Namespace Format Error

---

[API](https://skmtc.dev/cloudzero/apis/cloudzero-api-v2-resources.md) · [All operations](https://skmtc.dev/cloudzero/apis/cloudzero-api-v2-resources/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cloudzero/cloudzero-api-v2-resources/revisions/fd805a0e75e5/schema)
