Skip to content

Get Namespaces

GET /api/v1/namespaces

GET /maas/api/v1/namespaces

Returns namespaces accessible to the user. Cluster admins receive all non-system namespaces. Regular users receive only OpenShift projects they can access. System namespaces (for example openshift-*, kube-*, default, opendatahub) are excluded.

Authorization

Responses

Status Description Response body
200 OK

List of namespaces

object

application/json

400 Bad Request

Bad Request

None
401 Unauthorized

Unauthorized

None
500 Internal Server Error

Internal Server Error

None

200 OK response body

Property Type Required Description
data array of Namespace No

Example request

curl -X GET "/maas/api/v1/namespaces" \
  -H "Authorization: Bearer $TOKEN"

Example response

200 OK, application/json

{
  "data": [
    {
      "name": "string",
      "displayName": "string"
    }
  ]
}