# Update database

This endpoint updates the "default" and "note" properties of a given database.

Method Path Operation*
PATCH account/services/databases/{database} update_database

*

In order for a user to perform the "update_database" operation, the "update_database" permission must be included in the list of allowed actions in the statement of the user's role.

# Request

Parameter Type In Description
{database}
required
string path Database UUID.
default
optional *
boolean body Denotes whether the database is the default database for the account. There must be a single default database at any given time. Therefore, you need to change the value of the "default" property to true for the database given database. This will automatically change the value of the previous default database to False.
note
optional *
string body User-defined note. The maximum length of a note is 256 characters.

*

Any optional parameters not provided in the request will be left unchanged. Any optional parameters provided in the request will replace current parameters.

# Response

Attribute Type Description
uuid string Database UUID.
default boolean Denotes whether the given database is the default database for the account.
status string, value is "running", "pending", or "service" Status of the database:
- "running": The Timeseries database is running.
- "pending": The Timeseries database is in the process of initialising.
- "service": Unexpected behaviour occurred and the Timeseries database is not available.
database_size integer Size, in bytes, of the database.
instance_type string, value is "micro", "medium", "xlarge", or "custom" Instance type used in the database.
note string User-defined note. The maximum length of a note is 256 characters.
created_ts timestamp Time at which the database was created. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
updated_ts timestamp Time at which the database was last updated. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).

Was this article helpful?