简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。
列出命名空间
贡献者
您可以列出可用的命名空间。
执行以下REST API调用以列出命名空间。
HTTP方法和端点
此REST API调用使用以下方法和端点。
HTTP 方法 | 路径 |
---|---|
获取 |
/accouns/{account_id}/topology/v1/namespaces |
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": {} }