# 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.

```text
GET $CLOUDSIGMA_API_BASE/data-share/publishes/check-name
```

## Before you call this API

Configure the [regional API endpoint and authentication](https://omnifabric.cloudsigma.com/docs/developer/endpoints-and-authentication.html.md), and select the target workspace.

Set the operation-specific values used in the request:

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

## Request example

```bash
curl --get "$CLOUDSIGMA_API_BASE/data-share/publishes/check-name" \
  --data-urlencode "name=$PUBLICATION_NAME" \
  -H "X-API-Key: $CLOUDSIGMA_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.

```json
{
  "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

```json
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}
```

### Common HTTP errors

```{list-table}
:header-rows: 1
:widths: 12 22 32 34

* - 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.
```
