---
updatedAt: 2026-05-28T08:16:45.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# List Module Namespaces

This endpoint lists module namespaces by various filters.

To list module namespaces accessible from a certain environment, `filter[environment]` has to be
specified. Module namespaces from the account which this environment belongs to will be listed as well.

To list module namespaces accessible from a certain account, `filter[account]` has to be specified.

If no filters were specified, all module namespaces which the user has read access to will be
listed.


# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "ModuleNamespace": {
        "description": "A terraform module namespace in the [Private Module Registry](../../module.html).",
        "properties": {
          "attributes": {
            "properties": {
              "is-shared": {
                "description": "Whether the module namespace is shared across all current and future environments.",
                "type": "boolean"
              },
              "name": {
                "description": "The module namespace name.",
                "maxLength": 255,
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "relationships": {
            "properties": {
              "environments": {
                "description": "The environments in which the namespace modules can be used.",
                "properties": {
                  "data": {
                    "items": {
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "environments",
                            ""
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "type": "object"
                    },
                    "nullable": true,
                    "type": "array"
                  }
                },
                "required": [
                  "data"
                ],
                "type": "object"
              },
              "modules": {
                "description": "The modules in the module namespace.",
                "properties": {
                  "data": {
                    "items": {
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "modules",
                            ""
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "type": "object"
                    },
                    "nullable": true,
                    "type": "array"
                  }
                },
                "readOnly": true,
                "required": [
                  "data"
                ],
                "type": "object"
              },
              "owners": {
                "description": "The teams, the module namespace belongs to.",
                "properties": {
                  "data": {
                    "items": {
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "teams",
                            ""
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "type": "object"
                    },
                    "nullable": true,
                    "type": "array"
                  }
                },
                "required": [
                  "data"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "type": {
            "enum": [
              "module-namespaces"
            ],
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "ModuleNamespaceListingDocument": {
        "description": "JSON:API Document Listing\n\nsee: https://jsonapi.org/format/#document-structure",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ModuleNamespace"
            },
            "type": "array"
          },
          "included": {
            "items": {
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "readOnly": true,
            "type": "object"
          },
          "meta": {
            "readOnly": true,
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "API-Key": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Scalr IACP API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "title": "Scalr IACP API",
    "version": "unversioned"
  },
  "openapi": "3.0.0",
  "paths": {
    "/module-namespaces": {
      "get": {
        "description": "This endpoint lists module namespaces by various filters.\n\nTo list module namespaces accessible from a certain environment, `filter[environment]` has to be\nspecified. Module namespaces from the account which this environment belongs to will be listed as well.\n\nTo list module namespaces accessible from a certain account, `filter[account]` has to be specified.\n\nIf no filters were specified, all module namespaces which the user has read access to will be\nlisted.\n",
        "operationId": "list_module_namespaces",
        "parameters": [
          {
            "description": "Page number",
            "in": "query",
            "name": "page[number]",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "page[size]",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter module namespaces by name",
            "in": "query",
            "name": "filter[name]",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter module namespaces by environment",
            "in": "query",
            "name": "filter[environment]",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The comma-separated list of attributes.",
            "explode": false,
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "items": {
                "enum": [
                  "name"
                ],
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/vnd.api+json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleNamespaceListingDocument"
                }
              }
            },
            "description": "Success."
          },
          "404": {
            "description": "Module namespaces not found, or user unauthorized to perform action."
          },
          "4XX": {
            "description": "Client error."
          },
          "5XX": {
            "description": "Server error."
          }
        },
        "summary": "List Module Namespaces",
        "tags": [
          "module-namespaces"
        ],
        "x-resource": "ModuleNamespace",
        "x-service": "tf-api"
      }
    }
  },
  "security": [
    {
      "API-Key": []
    }
  ],
  "servers": [
    {
      "url": "https://{Domain}/api/iacp/v3",
      "variables": {
        "Domain": {
          "default": "example.scalr.io",
          "description": "Domain where Scalr is hosted"
        }
      }
    }
  ]
}
```

# Sibling pages

* [Get a Module Namespace](https://docs.scalr.io/scalr/reference/get_module_namespace.md)
* [Create a Module Namespace](https://docs.scalr.io/scalr/reference/create_module_namespace.md)
* [Delete a Module Namespace](https://docs.scalr.io/scalr/reference/delete_module_namespace.md)
* [Update a Module Namespace](https://docs.scalr.io/scalr/reference/update_module_namespace.md)