---
title: "Get all namespaces"
method: GET
path: "/v2/costformation/namespace"
tags: ["costformation-namespaces"]
---

# Get all namespaces

`GET /v2/costformation/namespace`

Retrieves all namespaces for the organization with pagination support

## Query parameters

- `limit` number
- `cursor` string
- `sort_key` 'last_updated' | 'fqn' — Sortable Namespace properties
- `sort_order` 'asc' | 'desc'

## Headers

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

## Response `200`

List of namespaces retrieved successfully

- object
  - `namespaces` NamespaceBody[]
    - `id` string, required — The namespace identifier (FQN format, e.g. `User:MyNamespace`)
    - `view_role_ids` string[], nullable — List of Role IDs whose members can view dimensions in this namespace. If null or empty, the namespace is publicly visible to all users.
    - `edit_role_ids` string[], nullable — List of Role IDs whose members can create and edit dimensions in this namespace. If null or empty, the namespace is publicly editable. Must be a subset of `view_role_ids`.
    - `display_name` string, nullable — Optional human-friendly display name for the namespace. If not provided, the namespace identifier (FQN) is used as the display name.

## Other responses

- `400` — Bad Request Error
- `403` — Forbidden

---

[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)
