更新项目 (V2)
本接口可更新指定项目的名称和描述。
PATCH/v2/projects/{projectId}
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com
📘说明
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
shell
export BASE_URL="https://api.cloud.zilliz.com"
参数
Authorizationstringheader必填项
认证令牌,应为具备适当权限的 API 密钥。
示例值:Bearer {{TOKEN}}
OrgIdstringheader必填项
项目所属的组织 ID。
示例值:org-xxxxxxxxxxxxxxxxxxx
projectIdstringpath必填项
待更新项目的 ID。
示例值:proj-xxxxxxxxxxxxxxxxxxx
请求体application/json
projectNamestring
项目的新名称。值不能为空字符串。
descriptionstring
项目的新描述。值可以为空字符串。
bash
export TOKEN="YOUR_API_KEY"
export projectId="proj-xxxxxxxxxxxxxxxxxxx"
curl --request PATCH \
--url "${BASE_URL}/v2/projects/${projectId}" \
--header "Authorization: Bearer ${TOKEN}" \
--header "OrgId: org-xxxxxxxxxxxxxxxxxxx" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"projectName": "New Project Name",
"description": "This is a new description of the project."
}'
bash
export TOKEN="YOUR_API_KEY"
export projectId="proj-xxxxxxxxxxxxxxxxxxx"
curl --request PATCH \
--url "${BASE_URL}/v2/projects/${projectId}" \
--header "Authorization: Bearer ${TOKEN}" \
--header "OrgId: org-xxxxxxxxxxxxxxxxxxx" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"projectName": "New Project Name"
}'
bash
export TOKEN="YOUR_API_KEY"
export projectId="proj-xxxxxxxxxxxxxxxxxxx"
curl --request PATCH \
--url "${BASE_URL}/v2/projects/${projectId}" \
--header "Authorization: Bearer ${TOKEN}" \
--header "OrgId: org-xxxxxxxxxxxxxxxxxxx" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"description": "This is a new description of the project."
}'
响应200 OK - application/json
None
A success response
codeinteger
响应码。
示例值:0
datastring
一个字符串 'ok',表示项目更新成功。
A failure response.
codeinteger
响应码。
messagestring
错误描述。
Successjson
{
"code": 0,
"data": "ok"
}