更新项目 (V2)
This operation updates the name and description of a specified project.
PATCH/v2/projects/{projectId}
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com.cn
📘说明
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
export BASE_URL="https://api.cloud.zilliz.com.cn"
参数
Authorizationstringheaderrequired
认证令牌,应为具备适当权限的 API 密钥。
示例值:Bearer {{TOKEN}}
OrgIdstringheaderrequired
项目所属的组织 ID。
示例值:org-xxxxxxxxxxxxxxxxxxx
projectIdstringpathrequired
待更新项目的 ID。
示例值:proj-xxxxxxxxxxxxxxxxxxx
请求体application/json
projectNamestring
项目的新名称。值不能为空字符串。
descriptionstring
项目的新描述。值可以为空字符串。
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."
}'
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"
}'
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 - application/json
A success response
codeinteger
响应码。
示例值:0
datastring
一个字符串 'ok',表示项目更新成功。
A failure response.
codeinteger
响应码。
messagestring
错误描述。
{
"code": 0,
"data": "ok"
}