Skip to main content
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

列出命名空間

貢獻者

您可以列出可用的命名空間。

執行下列REST API呼叫、以列出命名空間。

HTTP 方法和端點

此 REST API 呼叫使用下列方法和端點。

HTTP方法 路徑

取得

/Accounts /{account_id}/拓撲/ v1/命名 空間

Curl範例:傳回所有命名空間的所有資料
curl --request GET \
--location "https://astra.netapp.io/accounts/$ACCOUNT_ID/topology/v1/namespaces" \
--include \
--header "Accept: */*" \
--header "Authorization: Bearer $API_TOKEN"
Curl範例:所有命名空間的傳回名稱、狀態和叢集ID
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輸出範例
{
    "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": {}
}