---
title: List namespaces
slug: api-documentation/list-namespaces
docTags: 
createdAt: 2026-10-09T16:36:44.630Z
---

{
  "id": "d7XQFZkrRR-iYmJVLvBdH",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "http://localhost:8080/idgen/namespaces",
    "servers": [
      {
        "url": "{baseUrl}/idgen/namespaces",
        "description": "The API gateway, or the service itself (port 8080).",
        "variables": {
          "baseUrl": {
            "default": "http://localhost:8080",
            "description": "Scheme and host, e.g. https://<gateway>. No trailing slash."
          }
        }
      }
    ],
    "name": "List namespaces",
    "description": "<p>One page of the caller's tenant's namespaces, ordered by name. Needs <code>idgen.namespaces.read</code>.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "offset",
          "type": "integer<int32>",
          "description": "<p>How many to skip (>= 0). Default 0.</p>",
          "format": "int32"
        },
        {
          "kind": "optional",
          "name": "limit",
          "type": "integer<int32>",
          "description": "<p>The page size (1-1000). Default 100.</p>",
          "format": "int32"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>A JWT from authentication-svc. The tenant comes from the token.</p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The page of namespaces.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>One page of the caller's namespaces (or the templates).</p>",
            "customType": "NamespacePage",
            "schema": [
              {
                "name": "items",
                "kind": "optional",
                "type": "array",
                "description": "The namespaces on this page.",
                "modelRef": "#/components/schemas/NamespaceDto",
                "customType": "NamespaceDto[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "The namespace name."
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": "Free text for administrators."
                  },
                  {
                    "name": "status",
                    "kind": "required",
                    "type": "string",
                    "description": "ACTIVE or DISABLED."
                  },
                  {
                    "name": "currentVersion",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "<p>The version IDs come from right now; absent while no version is active.</p>",
                    "format": "int32"
                  },
                  {
                    "name": "createdAt",
                    "kind": "required",
                    "type": "string<date-time>",
                    "description": "When the namespace was created.",
                    "format": "date-time"
                  },
                  {
                    "name": "updatedAt",
                    "kind": "required",
                    "type": "string<date-time>",
                    "description": "When the namespace was last updated.",
                    "format": "date-time"
                  },
                  {
                    "name": "links",
                    "kind": "required",
                    "type": "map",
                    "description": "<p>Related resources: <code>self</code>, <code>versions</code> and, for namespaces, <code>ids</code> (paths under /idgen).</p>",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  }
                ]
              },
              {
                "name": "offset",
                "kind": "required",
                "type": "integer<int32>",
                "description": "The offset this page starts at.",
                "format": "int32"
              },
              {
                "name": "limit",
                "kind": "required",
                "type": "integer<int32>",
                "description": "The page size requested.",
                "format": "int32"
              }
            ],
            "modelRef": "#/components/schemas/NamespacePage",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>INVALID_REQUEST: a malformed path, query or body value.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>UNAUTHENTICATED: missing, expired or invalid credentials.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "<p>FORBIDDEN: the caller lacks the <code>idgen.namespaces.read</code> permission, or its tenant or site scope does not match.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "<p>INTERNAL_ERROR: an unexpected failure. Retry once, then report it with the <code>x-request-id</code>.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "503",
        "description": "<p>AUTH_UNAVAILABLE or BACKEND_UNAVAILABLE (both retryable): retry with backoff.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Vp9eROwkVOTROPWl7Nup7",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url http://localhost:8080/idgen/namespaces \\\n     --header 'accept: application/json'"
        },
        {
          "id": "h7zC4kL1RGOaXxk97w3qF",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost:8080/idgen/namespaces\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "CaaLNiUjASvYV6_gXHdOd",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:8080/idgen/namespaces\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "IWCVV2gXrsb0i7NNFqnNC",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:8080/idgen/namespaces\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Vp9eROwkVOTROPWl7Nup7"
    },
    "results": {
      "languages": [
        {
          "id": "rhgpelE1QgxVl6P4xCg_q",
          "language": "200",
          "code": "// The page of namespaces.\n{\n  \"items\": [\n    {\n      \"name\": \"\",\n      \"description\": \"\",\n      \"status\": \"\",\n      \"currentVersion\": \"\",\n      \"createdAt\": \"\",\n      \"updatedAt\": \"\",\n      \"links\": \"\"\n    }\n  ],\n  \"offset\": \"\",\n  \"limit\": \"\"\n}"
        },
        {
          "id": "Gv1LyNHuqecZjSRRFWvC2",
          "language": "400",
          "code": "// INVALID_REQUEST: a malformed path, query or body value.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "dGsvSQ_yr3WFl7HqVGOn1",
          "language": "401",
          "code": "// UNAUTHENTICATED: missing, expired or invalid credentials.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "OSX0D0L8UROIq1zppPrXO",
          "language": "403",
          "code": "// FORBIDDEN: the caller lacks the idgen.namespaces.read permission, or its tenant or site scope does not match.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "rbsv5sdeSJbYYfLUcIyOw",
          "language": "500",
          "code": "// INTERNAL_ERROR: an unexpected failure. Retry once, then report it with the x-request-id.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "PQnNXrOskfKUTrh1orwb7",
          "language": "503",
          "code": "// AUTH_UNAVAILABLE or BACKEND_UNAVAILABLE (both retryable): retry with backoff.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "rhgpelE1QgxVl6P4xCg_q"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}