Tables

Manage tables in an InfluxDB 3 Clustered database, including creating tables with custom column schemas.
POST /databases/{databaseName}/tables

Create a database table

Parameters

Path parameters
databaseName required string
The name of the database to create the database table for

Request body required

Content-Type: application/json
name required string
partitionTemplate string
Example request Ask AI about this
curl --request POST \
  "https://console.influxdata.com/api/v0/databases/{databaseName}/tables" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "name": "NAME",
  "partitionTemplate": []
}'

Responses

200 The cluster database table was successfully created
databaseName required string
The name of the database that the database table belongs to
name required string
The name of the database table
partitionTemplate string
400 Bad Request
code required integer
message required string
401 Unauthorized
code required integer
message required string
403 Forbidden
code required integer
message required string
404 Not Found
code required integer
message required string
409 Conflict
code required integer
message required string
500 Internal Server Error
code required integer
message required string
PUT /databases/{databaseName}/tables/{tableId}/undelete

Undelete a database table

Restores a previously deleted database table.

This operation can only be performed on tables that have been soft-deleted and are still within the recovery window.

Parameters

Path parameters
databaseName required string
The name of the database that the table belongs to
tableId required integer <int64>
The ID of the table to undelete
Example request Ask AI about this
curl --request PUT \
  "https://console.influxdata.com/api/v0/databases/{databaseName}/tables/{tableId}/undelete" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 The cluster database table was successfully undeleted
databaseName required string
The name of the database that the table belongs to
id required integer <int64>
The ID of the table
name required string
The name of the table
partitionTemplate string
400 Bad Request
code required integer
message required string
401 Unauthorized
code required integer
message required string
403 Forbidden
code required integer
message required string
404 Not Found
code required integer
message required string
500 Internal Server Error
code required integer
message required string
DELETE /databases/{databaseName}/tables/{tableName}

Delete a database table

Parameters

Path parameters
databaseName required string
The name of the database that the database table belongs to
tableName required string
The name of the database table to delete
Example request Ask AI about this
curl --request DELETE \
  "https://console.influxdata.com/api/v0/databases/{databaseName}/tables/{tableName}" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

204 The cluster database table was successfully deleted
400 Bad Request
code required integer
message required string
401 Unauthorized
code required integer
message required string
403 Forbidden
code required integer
message required string
404 Not Found
code required integer
message required string
500 Internal Server Error
code required integer
message required string
PUT /databases/{databaseName}/tables/{tableName}/rename

Rename a database table

Parameters

Path parameters
databaseName required string
The name of the database that the database table belongs to
tableName required string
The name of the database table to rename

Request body required

Content-Type: application/json
name required string
Example request Ask AI about this
curl --request PUT \
  "https://console.influxdata.com/api/v0/databases/{databaseName}/tables/{tableName}/rename" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "name": "NAME"
}'

Responses

200 The cluster database table was successfully renamed
databaseName required string
The name of the database that the table belongs to
id required integer <int64>
The ID of the table
name required string
The name of the table
partitionTemplate string
400 Bad Request
code required integer
message required string
401 Unauthorized
code required integer
message required string
403 Forbidden
code required integer
message required string
404 Not Found
code required integer
message required string
409 Conflict
code required integer
message required string
500 Internal Server Error
code required integer
message required string

Was this page helpful?

Thank you for your feedback!