Managed Databases v4.141.0
Managed Database Engines List
Display all available Managed Database engine types and versions. Engine IDs are used when creating new Managed Databases.
Authorizations
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl https://api.linode.com/v4/databases/engines/
linode-cli databases engines
Response Samples
{
"data": [
{
"engine": "mysql",
"id": "mysql/8.0.26",
"version": "8.0.26"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||
page | integer The current page. | ||||||
pages | integer The total number of pages. | ||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed Database Engine View
Display information for a single Managed Database engine type and version.
Authorizations
Path Parameters
engineId | string RequiredThe ID of the Managed Database engine. |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl https://api.linode.com/v4/databases/engines/mysql/5.7.30
linode-cli databases engine-view mysql/5.7.30
Response Samples
{
"engine": "mysql",
"id": "mysql/8.0.26",
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
engine Filterable | string The Managed Database engine type. |
id | string The Managed Database engine ID in engine/version format. |
version Filterable | string The Managed Database engine version. |
errors | array
of objects
|
Managed Databases List All
Display all Managed Databases that are accessible by your User, regardless of engine type.
For more detailed information on a particular Database instance, make a request to its instance_uri
.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/instances
linode-cli databases list
Response Samples
{
"data": [
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"instance_uri": "/v4/databases/mysql/instances/123",
"label": "example-db",
"region": "us-east",
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "8.0.26"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed MongoDB Databases List
Display all accessible Managed MongoDB Databases.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mongodb/instances/
linode-cli databases mongodb-list
Response Samples
{
"data": [
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"compression_type": "none",
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mongodb",
"hosts": {
"primary": "lin-0000-0000.servers.linodedb.net",
"secondary": null
},
"id": 123,
"label": "example-db",
"peers": [
"lin-0000-0000.servers.linodedb.net",
"lin-0000-0001.servers.linodedb.net",
"lin-0000-0002.servers.linodedb.net"
],
"port": 27017,
"region": "us-east",
"replica_set": null,
"ssl_connection": true,
"status": "active",
"storage_engine": "wiredtiger",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "4.4.10"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed MongoDB Database Delete
Remove a Managed MongoDB Database from your Account.
Requires read_write
access to the Database.
The Database must have an active
, failed
, or degraded
status to perform this command.
Only unrestricted Users can access this command, and have access regardless of the acting token’s OAuth scopes.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/mongodb/instances/123
linode-cli databases mongodb-delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MongoDB Database View
Display information for a single, accessible Managed MongoDB Database.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mongodb/instances/123
linode-cli databases mongodb-view 123
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"compression_type": "none",
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mongodb",
"hosts": {
"primary": "lin-0000-0000.servers.linodedb.net",
"secondary": null
},
"id": 123,
"label": "example-db",
"peers": [
"lin-0000-0000.servers.linodedb.net",
"lin-0000-0001.servers.linodedb.net",
"lin-0000-0002.servers.linodedb.net"
],
"port": 27017,
"region": "us-east",
"replica_set": null,
"ssl_connection": true,
"status": "active",
"storage_engine": "wiredtiger",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "4.4.10"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
compression_type | string Enum:
none
snappy
zlip
Default:
none The type of data compression for this Database. Snappy has a lower comparative compression ratio and resource consumption rate. Zlip has a higher comparative compression ratio and resource consumption rate. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Whether the Managed Databases is encrypted. | ||||||||||
engine Filterable | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
peers | array
of strings An array of peer addresses for this Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region Filterable | string The Region ID for the Managed Database. | ||||||||||
replica_set Nullable | string
<=
64
charactersLabel for configuring a MongoDB replica set. Choose the same label on multiple Databases to include them in the same replica set. If | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed MongoDB Database Credentials View ( GET /databases/mongodb/instances/{instanceId}/credentials) command for access information. | ||||||||||
status Filterable | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
storage_engine | string Enum:
mmapv1
wiredtiger
Default:
wiredtiger The type of storage engine for this Database. Note: MMAPV1 is not available for MongoDB versions 4.0 and above. | ||||||||||
type Filterable | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
version Filterable | string The Managed Database engine version. |
errors | array
of objects
|
Managed MongoDB Database Update
Update a Managed MongoDB Database.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Updating addresses in the allow_list
overwrites any existing addresses.
IP addresses on this list can access the Managed Database. All other sources are blocked.
Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database.Note: Updates to the
allow_list
may take a short period of time to complete, making this command inappropriate for rapid successive updates to this property. All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed MongoDB Database. The maintenance window for these updates is configured with the Managed Database’supdates
property.If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "example-db",
"allow_list": [
"203.0.113.1",
"192.0.1.0/24"
],
"updates" = {
"frequency": "monthly",
"duration": 3,
"hour_of_day": 12,
"day_of_week": 4,
"week_of_month": 3,
}
}' \
https://api.linode.com/v4/databases/mongodb/instances/123
linode-cli databases mongodb-update 123 \
--label example-db \
--allow_list 203.0.113.1 \
--allow_list 192.0.1.0/24 \
--updates.frequency monthly \
--updates.duration 3 \
--updates.hour_of_day 12 \
--updates.day_of_week 4 \
--updates.week_of_month 3
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
|
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"compression_type": "none",
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mongodb",
"hosts": {
"primary": "lin-0000-0000.servers.linodedb.net",
"secondary": null
},
"id": 123,
"label": "example-db",
"peers": [
"lin-0000-0000.servers.linodedb.net",
"lin-0000-0001.servers.linodedb.net",
"lin-0000-0002.servers.linodedb.net"
],
"port": 27017,
"region": "us-east",
"replica_set": null,
"ssl_connection": true,
"status": "active",
"storage_engine": "wiredtiger",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "4.4.10"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
compression_type | string Enum:
none
snappy
zlip
Default:
none The type of data compression for this Database. Snappy has a lower comparative compression ratio and resource consumption rate. Zlip has a higher comparative compression ratio and resource consumption rate. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Whether the Managed Databases is encrypted. | ||||||||||
engine Filterable | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
peers | array
of strings An array of peer addresses for this Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region Filterable | string The Region ID for the Managed Database. | ||||||||||
replica_set Nullable | string
<=
64
charactersLabel for configuring a MongoDB replica set. Choose the same label on multiple Databases to include them in the same replica set. If | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed MongoDB Database Credentials View ( GET /databases/mongodb/instances/{instanceId}/credentials) command for access information. | ||||||||||
status Filterable | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
storage_engine | string Enum:
mmapv1
wiredtiger
Default:
wiredtiger The type of storage engine for this Database. Note: MMAPV1 is not available for MongoDB versions 4.0 and above. | ||||||||||
type Filterable | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
version Filterable | string The Managed Database engine version. |
errors | array
of objects
|
Managed MongoDB Database Backups List
Display all backups for an accessible Managed MongoDB Database.
The Database must not be provisioning to perform this command.
Database auto
type backups are created every 24 hours at 0:00 UTC. Each auto
backup is retained for 7 days.
Database snapshot
type backups are created by accessing the Managed MongoDB Database Backup Snapshot Create (
POST /databases/mongodb/instances/{instanceId}/backups) command.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mongodb/instances/123/backups
linode-cli databases mongodb-backups-list 123
Response Samples
{
"data": [
{
"created": "2022-01-01T00:01:01",
"id": 123,
"label": "Scheduled - 02/04/22 11:11 UTC-XcCRmI",
"type": "auto"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||
page | integer The current page. | ||||||||
pages | integer The total number of pages. | ||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed MongoDB Database Backup Snapshot Create
Creates a snapshot backup of a Managed MongoDB Database.
Requires read_write
access to the Database.
Backups generated by this command have the type snapshot
. Snapshot backups may take several minutes to complete, after which they will be accessible to view or restore.
The Database must have an active
status to perform this command.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "db-snapshot",
"target": "primary"
}' \
https://api.linode.com/v4/databases/mongodb/instances/123/backups/
linode-cli databases mongodb-backup-snapshot 123 \
--label db-snapshot \
--target primary
Request Body Schema
label Required | string
3..64
charactersThe label for the Database snapshot backup.
|
target | string Enum:
primary
secondary
Default:
primary The Database cluster target.
If the Database is a high availability cluster, choosing |
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MongoDB Database Backup Delete
Delete a single backup for an accessible Managed MongoDB Database.
Requires read_write
access to the Database.
The Database must not be provisioning to perform this command.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
backupId | integer RequiredThe ID of the Managed MongoDB Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/mongodb/instances/123/backups/456
linode-cli databases mongodb-backup-delete 123 456
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MongoDB Database Backup View
Display information for a single backup for an accessible Managed MongoDB Database.
The Database must not be provisioning to perform this command.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
backupId | integer RequiredThe ID of the Managed MongoDB Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mongodb/instances/123/backups/456
linode-cli databases mongodb-backup-view 123 456
Response Samples
{
"created": "2022-01-01T00:01:01",
"id": 123,
"label": "Scheduled - 02/04/22 11:11 UTC-XcCRmI",
"type": "auto"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created Filterable | string<datetime> A time value given in a combined date and time format that represents when the database backup was created. |
id | integer The ID of the database backup object. |
label | string
<=
30
charactersThe database backup’s label, for display purposes only. Must include only ASCII letters or numbers. |
type Filterable | string Enum:
snapshot
auto The type of database backup, determined by how the backup was created. |
errors | array
of objects
|
Managed MongoDB Database Backup Restore
Restore a backup to a Managed MongoDB Database on your Account.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Note: Restoring from a backup will erase all existing data on the database instance and replace it with backup data.
Note: Currently, restoring a backup after resetting Managed Database credentials results in a failed cluster. Please contact Customer Support if this occurs.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
backupId | integer RequiredThe ID of the Managed MongoDB Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/mongodb/instances/123/backups/456/restore
linode-cli databases mongodb-backup-restore 123 456
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MongoDB Database Credentials View
Display the root username and password for an accessible Managed MongoDB Database.
The Database must have an active
status to perform this command.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mongodb/instances/123/credentials/
linode-cli databases mongodb-creds-view 123
Response Samples
{
"password": "s3cur3P@ssw0rd",
"username": "linroot"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
password | string The randomly-generated root password for the Managed Database instance. |
username | string The root username for the Managed Database instance. |
errors | array
of objects
|
Managed MongoDB Database Credentials Reset
Reset the root password for a Managed MongoDB Database.
Requires read_write
access to the Database.
A new root password is randomly generated and accessible with the Managed MongoDB Database Credentials View ( GET /databases/mongodb/instances/{instanceId}/credentials) command.
Only unrestricted Users can access this command, and have access regardless of the acting token’s OAuth scopes.
Note: Note that it may take several seconds for credentials to reset.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/mongodb/instances/123/credentials/reset
linode-cli databases mongodb-creds-reset 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MongoDB Database Patch
Apply security patches and updates to the underlying operating system of the Managed MongoDB Database. This function runs during regular maintenance windows, which are configurable with the Managed MongoDB Database Update (
PUT /databases/mongodb/instances/{instanceId}) command.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Note:
If your database cluster is configured with a single node, you will experience downtime during this maintenance. Consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/mongodb/instances/123/patch
linode-cli databases mongodb-patch 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MongoDB Database SSL Certificate View
Display the SSL CA certificate for an accessible Managed MongoDB Database.
The Database must have an active
status to perform this command.
Note: New MongoDB Databases cannot currently be created.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MongoDB Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mongodb/instances/123/ssl
linode-cli databases mongodb-ssl-cert 123
Response Samples
{
"ca_certificate": "LS0tLS1CRUdJ...=="
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
ca_certificate | string<base64> The base64-encoded SSL CA certificate for the Managed Database instance. |
errors | array
of objects
|
Managed MySQL Databases List
Display all accessible Managed MySQL Databases.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/
linode-cli databases mysql-list
Response Samples
{
"data": [
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "8.0.26"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed MySQL Database Create
Provision a Managed MySQL Database.
Restricted Users must have the add_databases
grant to use this command.
New instances can take approximately 15 to 30 minutes to provision.
The allow_list
is used to control access to the Managed Database.
- IP addresses on this list can access the Managed Database. All other sources are blocked.
- Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database.
All Managed Databases include automatic, daily backups. Up to seven backups are automatically stored for each Managed Database, providing restore points for each day of the past week.
All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed MySQL Database during configurable maintenance windows.
If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
To modify update the maintenance window for a Database, use the Managed MySQL Database Update ( PUT /databases/mysql/instances/{instanceId}) command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "example-db",
"region": "us-east",
"type": "g6-dedicated-2",
"cluster_size": 3,
"engine": "mysql/8.0.26",
"encrypted": false,
"ssl_connection": true,
"replication_type": "semi_synch",
"allow_list": [
"203.0.113.1",
"192.0.1.0/24"
]
}' \
https://api.linode.com/v4/databases/mysql/instances
linode-cli databases mysql-create \
--label example-db1 \
--region us-east \
--type g6-dedicated-2 \
--cluster_size 3 \
--engine mysql/8.0.26 \
--encrypted false \
--ssl_connection false \
--replication_type semi_synch \
--allow_list 203.0.113.1 \
--allow_list 192.0.1.0/24
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( |
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. |
encrypted | boolean Whether the Managed Databases is encrypted. |
engine Required | string The Managed Database engine in engine/version format. |
label Filterable Required | string
3..32
charactersA unique, user-defined string referring to the Managed Database. |
region Filterable Required | string The Region ID for the Managed Database. |
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be |
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed MySQL Database Credentials View ( GET /databases/mysql/instances/{instanceId}/credentials) command for access information. |
type Filterable Required | string The Linode Instance type used by the Managed Database for its nodes. |
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Whether the Managed Databases is encrypted. | ||||||||||
engine Filterable | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region Filterable | string The Region ID for the Managed Database. | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed MySQL Database Credentials View ( GET /databases/mysql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status Filterable | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
type Filterable | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
version Filterable | string The Managed Database engine version. |
errors | array
of objects
|
Managed MySQL Database Delete
Remove a Managed MySQL Database from your Account.
Requires read_write
access to the Database.
The Database must have an active
, failed
, or degraded
status to perform this command.
Only unrestricted Users can access this command, and have access regardless of the acting token’s OAuth scopes.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/mysql/instances/123
linode-cli databases mysql-delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database View
Display information for a single, accessible Managed MySQL Database.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123
linode-cli databases mysql-view 123
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Whether the Managed Databases is encrypted. | ||||||||||
engine Filterable | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region Filterable | string The Region ID for the Managed Database. | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed MySQL Database Credentials View ( GET /databases/mysql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status Filterable | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
type Filterable | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
version Filterable | string The Managed Database engine version. |
errors | array
of objects
|
Managed MySQL Database Update
Update a Managed MySQL Database.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Updating addresses in the allow_list
overwrites any existing addresses.
- IP addresses on this list can access the Managed Database. All other sources are blocked.
- Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database. - Note: Updates to the
allow_list
may take a short period of time to complete, making this command inappropriate for rapid successive updates to this property.
All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed MySQL Database. The maintenance window for these updates is configured with the Managed Database’s updates
property.
If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "example-db",
"allow_list": [
"203.0.113.1",
"192.0.1.0/24"
],
"updates" = {
"frequency": "monthly",
"duration": 3,
"hour_of_day": 12,
"day_of_week": 4,
"week_of_month": 3,
}
}' \
https://api.linode.com/v4/databases/mysql/instances/123
linode-cli databases mysql-update 123 \
--label example-db \
--allow_list 203.0.113.1 \
--allow_list 192.0.1.0/24 \
--updates.frequency monthly \
--updates.duration 3 \
--updates.hour_of_day 12 \
--updates.day_of_week 4 \
--updates.week_of_month 3
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
|
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Whether the Managed Databases is encrypted. | ||||||||||
engine Filterable | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region Filterable | string The Region ID for the Managed Database. | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed MySQL Database Credentials View ( GET /databases/mysql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status Filterable | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
type Filterable | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
version Filterable | string The Managed Database engine version. |
errors | array
of objects
|
Managed MySQL Database Backups List
Display all backups for an accessible Managed MySQL Database.
The Database must not be provisioning to perform this command.
Database auto
type backups are created every 24 hours at 0:00 UTC. Each auto
backup is retained for 7 days.
Database snapshot
type backups are created by accessing the Managed MySQL Database Backup Snapshot Create (
POST /databases/mysql/instances/{instanceId}/backups) command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123/backups
linode-cli databases mysql-backups-list 123
Response Samples
{
"data": [
{
"created": "2022-01-01T00:01:01",
"id": 123,
"label": "Scheduled - 02/04/22 11:11 UTC-XcCRmI",
"type": "auto"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||
page | integer The current page. | ||||||||
pages | integer The total number of pages. | ||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed MySQL Database Backup Snapshot Create
Creates a snapshot backup of a Managed MySQL Database.
Requires read_write
access to the Database.
Backups generated by this command have the type snapshot
. Snapshot backups may take several minutes to complete, after which they will be accessible to view or restore.
The Database must have an active
status to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "db-snapshot",
"target": "primary"
}' \
https://api.linode.com/v4/databases/mysql/instances/123/backups/
linode-cli databases mysql-backup-snapshot 123 \
--label db-snapshot \
--target primary
Request Body Schema
label Required | string
3..64
charactersThe label for the Database snapshot backup.
|
target | string Enum:
primary
secondary
Default:
primary The Database cluster target. If the Database is a high availability cluster, choosing |
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database Backup Delete
Delete a single backup for an accessible Managed MySQL Database.
Requires read_write
access to the Database.
The Database must not be provisioning to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
backupId | integer RequiredThe ID of the Managed MySQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/mysql/instances/123/backups/456
linode-cli databases mysql-backup-delete 123 456
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database Backup View
Display information for a single backup for an accessible Managed MySQL Database.
The Database must not be provisioning to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
backupId | integer RequiredThe ID of the Managed MySQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123/backups/456
linode-cli databases mysql-backup-view 123 456
Response Samples
{
"created": "2022-01-01T00:01:01",
"id": 123,
"label": "Scheduled - 02/04/22 11:11 UTC-XcCRmI",
"type": "auto"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created Filterable | string<datetime> A time value given in a combined date and time format that represents when the database backup was created. |
id | integer The ID of the database backup object. |
label | string
<=
30
charactersThe database backup’s label, for display purposes only. Must include only ASCII letters or numbers. |
type Filterable | string Enum:
snapshot
auto The type of database backup, determined by how the backup was created. |
errors | array
of objects
|
Managed MySQL Database Backup Restore
Restore a backup to a Managed MySQL Database on your Account.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Note: Restoring from a backup will erase all existing data on the database instance and replace it with backup data.
Note: Currently, restoring a backup after resetting Managed Database credentials results in a failed cluster. Please contact Customer Support if this occurs.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
backupId | integer RequiredThe ID of the Managed MySQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/mysql/instances/123/backups/456/restore
linode-cli databases mysql-backup-restore 123 456
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database Credentials View
Display the root username and password for an accessible Managed MySQL Database.
The Database must have an active
status to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123/credentials/
linode-cli databases mysql-creds-view 123
Response Samples
{
"password": "s3cur3P@ssw0rd",
"username": "linroot"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
password | string The randomly-generated root password for the Managed Database instance. |
username | string The root username for the Managed Database instance. |
errors | array
of objects
|
Managed MySQL Database Credentials Reset
Reset the root password for a Managed MySQL Database.
Requires read_write
access to the Database.
A new root password is randomly generated and accessible with the Managed MySQL Database Credentials View ( GET /databases/mysql/instances/{instanceId}/credentials) command.
Only unrestricted Users can access this command, and have access regardless of the acting token’s OAuth scopes.
Note: Note that it may take several seconds for credentials to reset.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/mysql/instances/123/credentials/reset
linode-cli databases mysql-creds-reset 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database Patch
Apply security patches and updates to the underlying operating system of the Managed MySQL Database. This function runs during regular maintenance windows, which are configurable with the Managed MySQL Database Update ( PUT /databases/mysql/instances/{instanceId}) command.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Note
If your database cluster is configured with a single node, you will experience downtime during this maintenance. Consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/mysql/instances/123/patch
linode-cli databases mysql-patch 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed MySQL Database SSL Certificate View
Display the SSL CA certificate for an accessible Managed MySQL Database.
The Database must have an active
status to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed MySQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123/ssl
linode-cli databases mysql-ssl-cert 123
Response Samples
{
"ca_certificate": "LS0tLS1CRUdJ...=="
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
ca_certificate | string<base64> The base64-encoded SSL CA certificate for the Managed Database instance. |
errors | array
of objects
|
Managed PostgreSQL Databases List
Display all accessible Managed PostgreSQL Databases.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/
linode-cli databases postgresql-list
Response Samples
{
"data": [
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "postgresql",
"hosts": {
"primary": "lin-0000-000-pgsql-primary.servers.linodedb.net",
"secondary": "lin-0000-000-pgsql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_commit_type": "local",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "13.2"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed PostgreSQL Database Create
Provision a Managed PostgreSQL Database.
Restricted Users must have the add_databases
grant to use this command.
New instances can take approximately 15 to 30 minutes to provision.
The allow_list
is used to control access to the Managed Database.
- IP addresses on this list can access the Managed Database. All other sources are blocked.
- Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database.
All Managed Databases include automatic, daily backups. Up to seven backups are automatically stored for each Managed Database, providing restore points for each day of the past week.
All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed PostgreSQL Database during configurable maintenance windows.
If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
To modify update the maintenance window for a Database, use the Managed PostgreSQL Database Update ( PUT /databases/postgresql/instances/{instanceId}) command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Request Samples
curl -H "Content-Type: application/json" \ -H "Authorization: Bearer $TOKEN" \ -X POST -d '{
"label": "example-db",
"region": "us-east",
"type": "g6-dedicated-2",
"cluster_size": 3,
"engine": "postgresql/13.2",
"encrypted": false,
"ssl_connection": false,
"replication_type": "asynch",
"replication_commit_type": "local",
"allow_list": [
"203.0.113.1",
"192.0.1.0/24"
]
}' \ https://api.linode.com/v4/databases/postgresql/instances
linode-cli databases postgresql-create \
--label example-db \
--region us-east \
--type g6-dedicated-2 \
--cluster_size 3 \
--engine postgresql/13.2 \
--encrypted false \
--ssl_connection false \
--replication_type asynch \
--replication_commit_type local \
--allow_list 203.0.113.1 \
--allow_list 192.0.1.0/24
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( |
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. |
encrypted | boolean Whether the Managed Databases is encrypted. |
engine Required | string The Managed Database engine in engine/version format. |
label Filterable Required | string
3..32
charactersA unique, user-defined string referring to the Managed Database. |
region Filterable Required | string The Region ID for the Managed Database. |
replication_commit_type | string Enum:
on
local
remote_write
remote_apply
off
Default:
local The synchronization level of the replicating server. Must be Must be |
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be |
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed PostgreSQL Database Credentials View ( GET /databases/postgresql/instances/{instanceId}/credentials) command for access information. |
type Filterable Required | string The Linode Instance type used by the Managed Database for its nodes. |
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "postgresql",
"hosts": {
"primary": "lin-0000-000-pgsql-primary.servers.linodedb.net",
"secondary": "lin-0000-000-pgsql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_commit_type": "local",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "13.2"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Whether the Managed Databases is encrypted. | ||||||||||
engine Filterable | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region Filterable | string The Region ID for the Managed Database. | ||||||||||
replication_commit_type | string Enum:
on
local
remote_write
remote_apply
off
Default:
local The synchronization level of the replicating server. Must be Must be | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed PostgreSQL Database Credentials View ( GET /databases/postgresql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status Filterable | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
type Filterable | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
version Filterable | string The Managed Database engine version. |
errors | array
of objects
|
Managed PostgreSQL Database Delete
Remove a Managed PostgreSQL Database from your Account.
Requires read_write
access to the Database.
The Database must have an active
, failed
, or degraded
status to perform this command.
Only unrestricted Users can access this command, and have access regardless of the acting token’s OAuth scopes.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/postgresql/instances/123
linode-cli databases postgresql-delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database View
Display information for a single, accessible Managed PostgreSQL Database.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/123
linode-cli databases postgresql-view 123
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "postgresql",
"hosts": {
"primary": "lin-0000-000-pgsql-primary.servers.linodedb.net",
"secondary": "lin-0000-000-pgsql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_commit_type": "local",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "13.2"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Whether the Managed Databases is encrypted. | ||||||||||
engine Filterable | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region Filterable | string The Region ID for the Managed Database. | ||||||||||
replication_commit_type | string Enum:
on
local
remote_write
remote_apply
off
Default:
local The synchronization level of the replicating server. Must be Must be | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed PostgreSQL Database Credentials View ( GET /databases/postgresql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status Filterable | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
type Filterable | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
version Filterable | string The Managed Database engine version. |
errors | array
of objects
|
Managed PostgreSQL Database Update
Update a Managed PostgreSQL Database.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Updating addresses in the allow_list
overwrites any existing addresses.
- IP addresses on this list can access the Managed Database. All other sources are blocked.
- Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database. - Note: Updates to the
allow_list
may take a short period of time to complete, making this command inappropriate for rapid successive updates to this property.
All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed PostgreSQL Database. The maintenance window for these updates is configured with the Managed Database’s updates
property.
If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "example-db",
"allow_list": [
"203.0.113.1",
"192.0.1.0/24"
],
"updates" = {
"frequency": "monthly",
"duration": 3,
"hour_of_day": 12,
"day_of_week": 4,
"week_of_month": 3,
}
}' \
https://api.linode.com/v4/databases/postgresql/instances/123
linode-cli databases postgresql-update 123 \
--label example-db \
--allow_list 203.0.113.1 \
--allow_list 192.0.1.0/24 \
--updates.frequency monthly \
--updates.duration 3 \
--updates.hour_of_day 12 \
--updates.day_of_week 4 \
--updates.week_of_month 3
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
|
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "postgresql",
"hosts": {
"primary": "lin-0000-000-pgsql-primary.servers.linodedb.net",
"secondary": "lin-0000-000-pgsql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_commit_type": "local",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "13.2"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> When this Managed Database was created. | ||||||||||
encrypted | boolean Whether the Managed Databases is encrypted. | ||||||||||
engine Filterable | string The Managed Database engine type. | ||||||||||
hosts | object The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label Filterable | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region Filterable | string The Region ID for the Managed Database. | ||||||||||
replication_commit_type | string Enum:
on
local
remote_write
remote_apply
off
Default:
local The synchronization level of the replicating server. Must be Must be | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Use the Managed PostgreSQL Database Credentials View ( GET /databases/postgresql/instances/{instanceId}/credentials) command for access information. | ||||||||||
status Filterable | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up The operating status of the Managed Database. | ||||||||||
type Filterable | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
version Filterable | string The Managed Database engine version. |
errors | array
of objects
|
Managed PostgreSQL Database Backups List
Display all backups for an accessible Managed PostgreSQL Database.
The Database must not be provisioning to perform this command.
Database auto
type backups are created every 24 hours at 0:00 UTC. Each auto
backup is retained for 7 days.
Database snapshot
type backups are created by accessing the Managed PostgreSQL Database Backup Snapshot Create (
POST /databases/postgresql/instances/{instanceId}/backups) command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/123/backups
linode-cli databases postgresql-backups-list 123
Response Samples
{
"data": [
{
"created": "2022-01-01T00:01:01",
"id": 123,
"label": "Scheduled - 02/04/22 11:11 UTC-XcCRmI",
"type": "auto"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||
page | integer The current page. | ||||||||
pages | integer The total number of pages. | ||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed PostgreSQL Database Backup Snapshot Create
Creates a snapshot backup of a Managed PostgreSQL Database.
Requires read_write
access to the Database.
Backups generated by this command have the type snapshot
. Snapshot backups may take several minutes to complete, after which they will be accessible to view or restore.
The Database must have an active
status to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "db-snapshot",
"target": "primary"
}' \
https://api.linode.com/v4/databases/postgresql/instances/123/backups/
linode-cli databases postgresql-backup-snapshot 123 \
--label db-snapshot \
--target primary
Request Body Schema
label Required | string
3..64
charactersThe label for the Database snapshot backup.
|
target | string Enum:
primary
secondary
Default:
primary The Database cluster target. If the Database is a high availability cluster, choosing |
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database Backup Delete
Delete a single backup for an accessible Managed PostgreSQL Database.
Requires read_write
access to the Database.
The Database must not be provisioning to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
backupId | integer RequiredThe ID of the Managed PostgreSQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/postgresql/instances/123/backups/456
linode-cli databases postgresql-backup-delete 123 456
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database Backup View
Display information for a single backup for an accessible Managed PostgreSQL Database.
The Database must not be provisioning to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
backupId | integer RequiredThe ID of the Managed PostgreSQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/123/backups/456
linode-cli databases postgresql-backup-view 123 456
Response Samples
{
"created": "2022-01-01T00:01:01",
"id": 123,
"label": "Scheduled - 02/04/22 11:11 UTC-XcCRmI",
"type": "auto"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created Filterable | string<datetime> A time value given in a combined date and time format that represents when the database backup was created. |
id | integer The ID of the database backup object. |
label | string
<=
30
charactersThe database backup’s label, for display purposes only. Must include only ASCII letters or numbers. |
type Filterable | string Enum:
snapshot
auto The type of database backup, determined by how the backup was created. |
errors | array
of objects
|
Managed PostgreSQL Database Backup Restore
Restore a backup to a Managed PostgreSQL Database on your Account.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Note: Restoring from a backup will erase all existing data on the database instance and replace it with backup data.
Note: Currently, restoring a backup after resetting Managed Database credentials results in a failed cluster. Please contact Customer Support if this occurs.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
backupId | integer RequiredThe ID of the Managed PostgreSQL Database backup. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/postgresql/instances/123/backups/456/restore
linode-cli databases postgresql-backup-restore 123 456
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database Credentials View
Display the root username and password for an accessible Managed PostgreSQL Database.
The Database must have an active
status to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/123/credentials/
linode-cli databases postgresql-creds-view 123
Response Samples
{
"password": "s3cur3P@ssw0rd",
"username": "linroot"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
password | string The randomly-generated root password for the Managed Database instance. |
username | string The root username for the Managed Database instance. |
errors | array
of objects
|
Managed PostgreSQL Database Credentials Reset
Reset the root password for a Managed PostgreSQL Database.
Requires read_write
access to the Database.
A new root password is randomly generated and accessible with the Managed PostgreSQL Database Credentials View ( GET /databases/postgresql/instances/{instanceId}/credentials) command.
Only unrestricted Users can access this command, and have access regardless of the acting token’s OAuth scopes.
Note: Note that it may take several seconds for credentials to reset.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/postgresql/instances/123/credentials/reset
linode-cli databases postgresql-creds-reset 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database Patch
Apply security patches and updates to the underlying operating system of the Managed PostgreSQL Database. This function runs during regular maintenance windows, which are configurable with the Managed PostgreSQL Database Update ( PUT /databases/postgresql/instances/{instanceId}) command.
Requires read_write
access to the Database.
The Database must have an active
status to perform this command.
Note
If your database cluster is configured with a single node, you will experience downtime during this maintenance. Consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/postgresql/instances/123/patch
linode-cli databases postgresql-patch 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Managed PostgreSQL Database SSL Certificate View
Display the SSL CA certificate for an accessible Managed PostgreSQL Database.
The Database must have an active
status to perform this command.
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/postgresql/instances/123/ssl
linode-cli databases postgresql-ssl-cert 123
Response Samples
{
"ca_certificate": "LS0tLS1CRUdJ...=="
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
ca_certificate | string<base64> The base64-encoded SSL CA certificate for the Managed Database instance. |
errors | array
of objects
|
Managed Database Types List
Display all Managed Database node types. The type and number of nodes determine the resources and price of a Managed Database instance.
Each Managed Database can have one node type. In the case of a high availabilty Database, all nodes are provisioned according to the chosen type.
Authorizations
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl https://api.linode.com/v4/databases/types
linode-cli databases types
Response Samples
{
"data": [
{
"class": "nanode",
"deprecated": false,
"disk": 25600,
"engines": {
"mongodb": [
{
"price": {
"hourly": 0.03,
"monthly": 20
},
"quantity": 1
}
],
"mysql": [
{
"price": {
"hourly": 0.03,
"monthly": 20
},
"quantity": 1
}
],
"postgresql": [
{
"price": {
"hourly": 0.03,
"monthly": 20
},
"quantity": 1
}
]
},
"id": "g6-nanode-1",
"label": "DBaaS - Nanode 1GB",
"memory": 1024,
"vcpus": 1
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Managed Database Type View
Display the details of a single Managed Database type. The type and number of nodes determine the resources and price of a Managed Database instance.
Authorizations
Path Parameters
typeId | string RequiredThe ID of the Managed Database type. |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl https://api.linode.com/v4/databases/types/g6-nanode-1
linode-cli databases type-view g6-nanode-1
Response Samples
{
"class": "nanode",
"deprecated": false,
"disk": 25600,
"engines": {
"mongodb": [
{
"price": {
"hourly": 0.03,
"monthly": 20
},
"quantity": 1
}
],
"mysql": [
{
"price": {
"hourly": 0.03,
"monthly": 20
},
"quantity": 1
}
],
"postgresql": [
{
"price": {
"hourly": 0.03,
"monthly": 20
},
"quantity": 1
}
]
},
"id": "g6-nanode-1",
"label": "DBaaS - Nanode 1GB",
"memory": 1024,
"vcpus": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
class | string The compute class category. | ||||||||||||||||||||||||||||||
deprecated Filterable | boolean Whether this Database plan type has been deprecated and is no longer available. | ||||||||||||||||||||||||||||||
disk | integer The amount of disk space set aside for Databases of this plan type. The value is represented in megabytes. | ||||||||||||||||||||||||||||||
engines | object
| ||||||||||||||||||||||||||||||
id | string The ID representing the Managed Database node plan type. | ||||||||||||||||||||||||||||||
label | string A human-readable string that describes each plan type. For display purposes only. | ||||||||||||||||||||||||||||||
memory | integer The amount of RAM allocated to Database created of this plan type. The value is represented in megabytes. | ||||||||||||||||||||||||||||||
vcpus | integer The integer of number CPUs allocated to databases of this plan type. |
errors | array
of objects
|