Database
/api/v3/configure/databaseList databases
Parameters
Query parameters
format
required
stringshow_deleted
booleancurl --request GET \
"https://localhost:8181/api/v3/configure/database?format=FORMAT" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
databases
string[]data
objecterror
string/api/v3/configure/databaseCreate a database
Request body required
application/jsondb
required
stringretention_period
string"7d"curl --request POST \
"https://localhost:8181/api/v3/configure/database" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"db": "DB",
"retention_period": "7d"
}'Responses
data
objecterror
string/api/v3/configure/databaseUpdate a database
Request body required
application/jsonretention_period
string"7d"curl --request PUT \
"https://localhost:8181/api/v3/configure/database" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"retention_period": "7d"
}'Responses
data
objecterror
string/api/v3/configure/databaseDelete a database
hard_delete_at parameter to schedule a hard deletion.
Use the data_only parameter to delete data while preserving the database schema and resources.Parameters
Query parameters
db
required
stringdata_only
booleanfalse (default), the entire database is deleted.remove_tables
booleandata_only=true to remove table resources (caches) while preserving
database-level resources (tokens, triggers, processing engine configurations).
Has no effect when data_only=false.hard_delete_at
string <date-time>Schedule the database for hard deletion at the specified time. If not provided, the database will be soft deleted. Use ISO 8601 date-time format (for example, “2025-12-31T23:59:59Z”).
Deleting a database cannot be undone
Deleting a database is a destructive action. Once a database is deleted, data stored in that database cannot be recovered.
Also accepts special string values:
now— hard delete immediatelynever— soft delete only (default behavior)default— use the system default hard deletion time
curl --request DELETE \
"https://localhost:8181/api/v3/configure/database?db=DB" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
data
objecterror
string/api/v3/configure/database/retention_periodRemove database retention period
Parameters
Query parameters
db
required
stringcurl --request DELETE \
"https://localhost:8181/api/v3/configure/database/retention_period?db=DB" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
data
objecterror
stringWas this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB 3 Core and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.