Check release name¶
Checks whether the publication name is available in the current workspace. The final uniqueness is subject to the verification result when the release is created.
GET https://moi.matrixorigin.cn/newmoi/data-share/publishes/check-name
Preparation before calling¶
Prepare a personal access token with access to the target workspace, the workspace ID, and the publication name to check.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.$PUBLICATION_NAME: The publication name to check, passed via the query parametername.
Request example¶
curl --get "https://moi.matrixorigin.cn/newmoi/data-share/publishes/check-name" \
--data-urlencode "name=$PUBLICATION_NAME" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Query parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The publication name to check. |
Successful response¶
Returns 200 on success, available indicates whether the name is available at the time of the current check.
{
"code": "OK",
"msg": "OK",
"data": {
"available": true
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
boolean |
Whether the name is available at the time of current check. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
|
Provide a non-empty publication name. |
|
|
The current identity does not have permission to create publications. |
Use authorized credentials. |
|
|
Server failed to check name. |
Try again later. |