Skip to main content

List the namespaces

Contributors netapp-aoife dmp-netapp

You can list the available namespaces.

Perform the following REST API call to list the namespaces.

HTTP method and endpoint

This REST API call uses the following method and endpoint.

HTTP method Path

GET

/accounts/{account_id}/topology/v1/namespaces

Curl example: Return all data for all namespaces
curl --request GET \
--location "https://astra.netapp.io/accounts/$ACCOUNT_ID/topology/v1/namespaces" \
--include \
--header "Accept: */*" \
--header "Authorization: Bearer $API_TOKEN"
Curl example: Return name, state, and cluster ID for all namespaces
curl --request GET \
--location "https://astra.netapp.io/accounts/$ACCOUNT_ID/topology/v1/namespaces?include=name,namespaceState,clusterID" \
--include \
--header "Accept: */*" \
--header "Authorization: Bearer $API_TOKEN"
JSON output example
{
    "items": [
        [
            "default",
            "discovered",
            "922f924a-a476-4a79-97f6-472571698154"
        ],
        [
            "kube-node-lease",
            "discovered",
            "922f924a-a476-4a79-97f6-472571698154"
        ],
        [
            "kube-public",
            "discovered",
            "922f924a-a476-4a79-97f6-472571698154"
        ],
        [
            "kube-system",
            "discovered",
            "922f924a-a476-4a79-97f6-472571698154"
        ],
        [
            "mysql",
            "discovered",
            "922f924a-a476-4a79-97f6-472571698154"
        ],
        [
            "mysql-clone1",
            "discovered",
            "922f924a-a476-4a79-97f6-472571698154"
        ],
        [
            "netapp-acc-operator",
            "discovered",
            "922f924a-a476-4a79-97f6-472571698154"
        ],
        [
            "openshift",
            "discovered",
            "922f924a-a476-4a79-97f6-472571698154"
        ],
        [
            "trident",
            "discovered",
            "922f924a-a476-4a79-97f6-472571698154"
        ]
    ],
    "metadata": {}
}