创建项目 (V2)
This operation creates a new project with a specified name and subscription plan.
POST/v2/projects
该 API 的 Base URL 格式如下:
https://api.cloud.zilliz.com.cn
📘说明
控制面接口速率限制为单用户单接口每秒最多 20 个请求。
export BASE_URL="https://api.cloud.zilliz.com.cn"
参数
Authorizationstringheaderrequired
认证令牌,应为具备适当权限的 API 密钥。
示例值:Bearer {{TOKEN}}
请求体application/json
projectNamestring必填项
待创建项目的名称。
planstring必填项
项目的订阅计划。当前仅支持 Enterprise 一种。
regionIdsarray
要绑定到项目的地域 ID 列表。当订阅计划为 Enterprise 时,仅允许指定单个地域。如需绑定多个地域,需要使用 BusinessCritical 订阅计划。请注意,BusinessCritical 订阅计划在某些环境中可能不可用。
[]regionIdsstring
地域 ID。您可以使用 查看云服务地域 来获取可用地域 ID。
export TOKEN="YOUR_API_KEY"
curl --request POST \
--url "${BASE_URL}/v2/projects" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"projectName": "My Project",
"plan": "Enterprise",
"regionIds": [
"aws-us-east-1"
]
}'
响应200 - application/json
成功响应。
codeinteger
响应码。
示例值:0
dataobject
响应载荷,包含创建的项目 ID。
projectIdstring
ID of the created project.
失败响应。
codeinteger
响应码。
messagestring
错误描述。
{
"code": 0,
"data": {
"projectId": "proj-x"
}
}