本文由簡體中文內容自動轉碼而成。阿里雲不保證此自動轉碼的準確性、完整性及時效性。本文内容請以簡體中文版本為準。

擷取Collection列表

更新時間:2024-07-13 00:22

本文介紹如何通過HTTP API擷取所有已建立的Collection名稱列表。

前提條件

Method與URL

HTTP
GET https://{Endpoint}/v1/collections

使用樣本

說明

需要使用您的api-key替換樣本中的YOUR_API_KEY、您的Cluster Endpoint替換樣本中的YOUR_CLUSTER_ENDPOINT,代碼才能正常運行。

Shell
curl -H 'dashvector-auth-token: YOUR_API_KEY' \
 https://YOUR_CLUSTER_ENDPOINT/v1/collections

# example output:
# {
#   "request_id": "89557fca-50ca-400d-9828-a6c9ba5a4228",
#   "code": 0,
#   "message": "",
#   "output": [
#     "quickstart",
#   ]
# }

入參描述

參數

Location

類型

必填

說明

{Endpoint}

path

str

Cluster的Endpoint,可在控制台Cluster詳情中查看

dashvector-auth-token

header

str

api-key

出參描述

欄位

類型

描述

樣本

code

int

傳回值,參考返回狀態代碼說明

0

message

str

返回訊息

success

request_id

str

請求唯一id

output

array

所有Collection名稱列表

['my_collection1', 'my_collection2']

  • 本頁導讀 (1, M)
  • 前提條件
  • Method與URL
  • 使用樣本
  • 入參描述
  • 出參描述
文檔反饋
phone 聯絡我們

立即和Alibaba Cloud在線服務人員進行交談,獲取您想了解的產品信息以及最新折扣。

alicare alicarealicarealicare