Database endpoints
Delete a schema
Deletes one table and irreversibly purges all of its rows, indexes and related data.
DELETE /v1/tenants/{tenant}/schemas/{id}
- Verify the table IDCheck the precise table targeted for removal.
- Delete the tablePurge its rows, indexes and related data.
- Inspect the removal totalsReview reported deleted rows and keys.
Before you start
Use your database bearer token.
Check the table ID and the purge_rows option before deleting data. The example targets demo.people.
Path parameters
| Field | Type | Required |
|---|---|---|
tenant | string | Required |
id | string | Required |
Query parameters
| Field | Type | Required |
|---|---|---|
purge_rows | boolean | Optional |
Headers
| Field | Type | Required | Description |
|---|---|---|---|
x-oc-db-user | string | Optional | Acting database user (role, grant and row-policy checks). Send with x-oc-db-key. |
x-oc-db-key | string | Optional | API key of the x-oc-db-user user. |
Read the result
The result reports removed rows and keys and marks the operation irreversible. This deletes the table's data and indexes, not just its schema definition.
Response statuses
HTTP status reference
| Status | What to do |
|---|---|
| 200 | OK |
| 204 | No content |
| 400 | Correct the request before retrying. |
| 401 | Check the credential and Authorization header. |
| 402 | Check feature access or available credits. |
| 403 | Check tenant access, roles and permissions. |
| 404 | Check the resource ID and API route. |
| 409 | Resolve the conflict before retrying. |
| 429 | Honor Retry-After when present; back off. |
| 500 | Check the outcome before retrying a write. |
| 501 | Check deployment support for this operation. |
| 502 | Check service availability and the write outcome. |
| 503 | Honor Retry-After when present; check write outcomes. |