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

列出命名空間

貢獻者

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

1.列出命名空間

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

HTTP方法 路徑

取得

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

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