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 the X-API-Key Header.

  • $WORKSPACE_ID: Target workspace ID, passed through X-Workspace-ID Header.

  • $PUBLICATION_NAME: The publication name to check, passed via the query parameter name.

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

name

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

data.available

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

400

ErrParamInvalid

name not provided.

Provide a non-empty publication name.

403

ErrPermissionDenied

The current identity does not have permission to create publications.

Use authorized credentials.

500

ErrServer

Server failed to check name.

Try again later.

Last updated on