# Delete view

Delete the specified view. This operation is not reversible; please confirm that the view is no longer needed before performing it.

```text
POST $CLOUDSIGMA_API_BASE/meta/view/drop
```

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

You can first [query the table in the database](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-processing/sql-metadata/list-database-tables.html.md) to confirm the name.

## Request body

Replace caller-specific values in the example with actual values.

::::{div} mo-api-split
:::{div} mo-api-split-main
<dl class="mo-api-fields">
<div class="mo-api-field"><dt><code>db_name</code><span class="mo-api-field__type">string</span><span class="mo-api-field__required">Required</span></dt><dd>The name of the database where the view is located.</dd></div>
<div class="mo-api-field"><dt><code>table_name</code><span class="mo-api-field__type">string</span><span class="mo-api-field__required">Required</span></dt><dd>The name of the view to delete.</dd></div>
</dl>
:::
:::{div} mo-api-split-aside
<p class="mo-api-example-label">Request example</p>
```bash
curl -X POST "$CLOUDSIGMA_API_BASE/meta/view/drop" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d "{\"db_name\":\"$DATABASE\",\"table_name\":\"$VIEW\"}"
```
:::
::::
## Successful response

```json
{"code":200,"data":null}
```

The response fields are as follows.

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | `200` on success. |
| `data` | null | This operation does not return a result object. |

A successful response does not return an object. Then [query the table in the database](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-processing/sql-metadata/list-database-tables.html.md) to confirm that the view no longer appears.

## Error response

::::{div} mo-api-split
:::{div} mo-api-split-main
<dl class="mo-api-fields">
<div class="mo-api-field"><dt><code>code</code><span class="mo-api-field__type">integer or string</span></dt><dd>Error code or status.</dd></div>
<div class="mo-api-field"><dt><code>message</code><span class="mo-api-field__type">string</span></dt><dd>Error message.</dd></div>
</dl>
:::
:::{div} mo-api-split-aside
<p class="mo-api-example-label">Error response example</p>
```json
{
  "code": 400,
  "message": "table_name 不能为空"
}
```
:::
::::
## Follow-up operations

[View table field](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-processing/sql-metadata/list-table-columns.html.md), confirm that the target no longer appears.
