Create a table |
Use the [`influxdb3 create table` command](/influxdb3/enterprise/reference/cli/influxdb3/create/table/) or the [HTTP API](/influxdb3/enterprise/api/v3/) to create a new table in a specified database in InfluxDB 3 Enterprise. Provide the database name, table name, and tag columns.
|
|
201 |
```sh
# CLI
influxdb3 create table \
--tags tag1,tag2,tag3 \
--database <DATABASE_NAME> \
--token <AUTH_TOKEN> \
<TABLE_NAME>
# HTTP API
curl -X POST "http://localhost:8181/api/v3/configure/table" \
--header "Authorization: Bearer <AUTH_TOKEN>" \
--header "Content-Type: application/json" \
--data '{"db": "<DATABASE_NAME>", "table": "<TABLE_NAME>", "tags": ["tag1", "tag2", "tag3"]}'
```
|
/influxdb3/enterprise/reference/cli/influxdb3/create/table/ |
/influxdb3/enterprise/reference/naming-restrictions/ |
/influxdb3/enterprise/api/v3/ |
|
/shared/influxdb3-admin/tables/create.md |