Skip to content

Databases

All operations require authentication.

35 operationsv1/hosting/web
Agent setup

List databasesProduction

GET
/1.0/hosting/web/{serviceName}/database

List databases. Returns the names of the databases of the hosting. Filter them by mode, name, server, type or user.

Path parameters

serviceName
required
string

The internal name of your hosting

Query parameters

mode
ModeEnum

Filter the value of mode property (=)

Valuesbesteffortclassicmodule
name
string

Filter the value of name property (like)

server
string

Filter the value of server property (like)

type
DatabaseTypeEnum

Filter the value of type property (=)

Valuesmariadbmongodbmysqlpostgresqlredis
user
string

Filter the value of user property (like)

Response

200string[]successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Get a databaseProduction

GET
/1.0/hosting/web/{serviceName}/database/{name}

Get a database. Returns the type, version, server, port, user, quota and status of the database, and the URL of its management tool.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200databasesuccessful operation
databaseServiceDeprecated
read-only
boolean

Whether service database is deprecated

databaseType
read-only
DatabaseServiceTypeEnum

Database service type

Valuesextraincludedoptional
dumps
read-only
integer

The number of available dumps associated to this database

guiURL
read-only
string

URL for the graphical user interface

lastCheck
read-only
stringdate-time

Date of the last check quota

mode
read-only
ModeEnum

Mode of your database

Valuesbesteffortclassicmodule
name
read-only
string

Database name (like mydb.mysql.db or mydb.postgres.db)

port
read-only
integer

The port on where to contact this database

quotaSize
read-only
UnitAndValue_double

Space allowed

quotaUsed
read-only
UnitAndValue_double

Space used

server
read-only
string

Your database server name

sqlpersoId
read-only
integer

Which SQLPerso this database is linked to (if any)

state
read-only
StateEnum

Database state

Valuescloseokreadonly
status
read-only
StatusEnum

The database status

Valuescheckingcreatedcreatingdeletingdumpingimportinglockedoptimizingrestoringupdating
taskId
read-only
integer

The task ID working on this database

type
read-only
DatabaseTypeEnum

Type of your database

Valuesmariadbmongodbmysqlpostgresqlredis
user
read-only
string

Database user name

version
read-only
VersionEnum

Database version following the database type

Values1010.110.1110.210.310.410.510.6111213153.23.44.05.15.55.65.76.07.08.08.49.49.59.6
versionSupport
read-only
SupportedVersionEnum

Indicates the current support state of your database version

Valuesbetadeprecatedstable

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "databaseServiceDeprecated": true, "databaseType": "extra", "dumps": 0, "guiURL": "string", "lastCheck": "2024-01-01T12:00:00Z", "mode": "besteffort", "name": "string", "port": 0, "quotaSize": { "unit": "string", "value": 0 }, "quotaUsed": { "unit": "string", "value": 0 }, "server": "string", "sqlpersoId": 0, "state": "close", "status": "checking", "taskId": 0, "type": "mariadb", "user": "string", "version": "10", "versionSupport": "beta"}

Get database capabilitiesProduction

GET
/1.0/hosting/web/{serviceName}/database/{name}/capabilities

Get database capabilities. Returns the functions available on the database, such as dump, restore or password change, and the URL of its management tool.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200DatabaseCapabilitiessuccessful operation
changePassword
boolean

Availability of the changePassword function

changeRight
boolean

Availability of the changeRight function

delete
boolean

Availability of the delete function

dump
boolean

Availability of the dump function

getQuota
boolean

Availability of the getQuota function

getRight
boolean

Availability of the getQuota function

guiURL
string

URL of the database management tool

optimize
boolean

Availability of the optimize function

restore
boolean

Availability of the restore function

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/capabilities \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "changePassword": true, "changeRight": true, "delete": true, "dump": true, "getQuota": true, "getRight": true, "guiURL": "string", "optimize": true, "restore": true}

List database copiesProduction

GET
/1.0/hosting/web/{serviceName}/database/{name}/copy

List database copies. Returns the IDs of the copies of the database. Each copy is kept until its expiration date.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200string[]successful operation

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/copy \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "00000000-0000-0000-0000-000000000000"]

Get a database copyProduction

GET
/1.0/hosting/web/{serviceName}/database/{name}/copy/{id}

Get a database copy. Returns the status, creation date and expiration date of the copy. Restore it into the database with copyRestore.

Path parameters

id
required
stringuuid

Copy id

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200copysuccessful operation
creationDate
read-only
stringdate-time

Creation date

expirationDate
read-only
stringdate-time

Expiration date

id
read-only
stringuuid

Copy id

lastUpdate
read-only
stringdate-time

Last update date

status
read-only
StatusEnum

Copy status

Valuesdoingdoneerrortodo

Example uses id = 00000000-0000-0000-0000-000000000000, name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/copy/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creationDate": "2024-01-01T12:00:00Z", "expirationDate": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "lastUpdate": "2024-01-01T12:00:00Z", "status": "doing"}

List database dumpsProduction

GET
/1.0/hosting/web/{serviceName}/database/{name}/dump

List database dumps. Returns the IDs of the dumps of the database. Filter them by creation or deletion date.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Query parameters

creationDate.from
stringdate-time

Filter the value of creationDate property (>=)

creationDate.to
stringdate-time

Filter the value of creationDate property (<=)

deletionDate.from
stringdate-time

Filter the value of deletionDate property (>=)

deletionDate.to
stringdate-time

Filter the value of deletionDate property (<=)

type
DateEnum

Filter the value of type property (=)

Valuesdaily.1nowweekly.1

Response

200integer[]successful operation

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/dump \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Get a database dumpProduction

GET
/1.0/hosting/web/{serviceName}/database/{name}/dump/{id}

Get a database dump. Returns the status, type, download URL and automatic deletion date of the dump. The type tells whether it comes from the current database or from a daily or weekly backup.

Path parameters

id
required
integer

Dump id

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200dumpsuccessful operation
creationDate
read-only
stringdate-time

Creation date of the dump

deletionDate
read-only
stringdate-time

Automatic deletion date of the dump

id
read-only
integer

Dump id

status
read-only
StatusEnum

The dump status

Valuescreatedcreatingdeleting
taskId
read-only
integer

The task ID working on this dump

type
read-only
DateEnum

Dump type

Valuesdaily.1nowweekly.1
url
read-only
string

Dump url access

Example uses id = 0, name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/dump/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creationDate": "2024-01-01T12:00:00Z", "deletionDate": "2024-01-01T12:00:00Z", "id": 0, "status": "created", "taskId": 0, "type": "daily.1", "url": "string"}

Get a database metrics tokenProduction

GET
/1.0/hosting/web/{serviceName}/database/{name}/metricsToken

Get a database metrics token. Generates a token to read the database metrics and returns it with the endpoint to query.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200MetricsTokensuccessful operation
endpoint
string

The url of the endpoint

token
stringpassword

The token value

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/metricsToken \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "endpoint": "string", "token": "string"}

Get database statisticsProduction

GET
/1.0/hosting/web/{serviceName}/database/{name}/statistics

Get database statistics. Returns the number of statements or their mean execution time over a period.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Query parameters

period
required
StatisticsPeriodEnum

Available periods for statistics

Valuesdailymonthlyweeklyyearly
type
required
StatisticsTypeEnum

Types of statistics available for the database

ValuesstatementstatementMeanTime

Response

200ChartTimestampValue[]successful operation
serieName
string
—
unit
string
—
values
ChartTimestampValue[]
—

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/statistics \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "serieName": "string", "unit": "string", "values": [ { "timestamp": 0, "value": 0 } ] }]

List database typesProduction

GET
/1.0/hosting/web/{serviceName}/databaseAvailableType

List database types. Returns the database types that can be created on the hosting: MariaDB, MongoDB, MySQL, PostgreSQL or Redis, depending on the offer.

Path parameters

serviceName
required
string

The internal name of your hosting

Response

200DatabaseTypeEnum[]successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/databaseAvailableType \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "mariadb"]

List database versionsProduction

GET
/1.0/hosting/web/{serviceName}/databaseAvailableVersion

List database versions. Returns the available versions of a database type, and the version used when a database is created without one.

Path parameters

serviceName
required
string

The internal name of your hosting

Query parameters

type
required
DatabaseTypeEnum

Type of the database

Valuesmariadbmongodbmysqlpostgresqlredis

Response

200AvailableVersionStructsuccessful operation
default
VersionEnum

Database default version

Values1010.110.1110.210.310.410.510.6111213153.23.44.05.15.55.65.76.07.08.08.49.49.59.6
list
VersionEnum[]

Database available version

Values1010.110.1110.210.310.410.510.6111213153.23.44.05.15.55.65.76.07.08.08.49.49.59.6

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/databaseAvailableVersion \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "default": "10", "list": [ "10" ]}

Get database creation capabilitiesProduction

GET
/1.0/hosting/web/{serviceName}/databaseCreationCapabilities

Get database creation capabilities. Returns, for each database offer of the hosting, the engines, the quota and the number of databases left to create.

Path parameters

serviceName
required
string

The internal name of your hosting

Response

200CreationDatabaseCapabilities[]successful operation
available
integer

Number of database left for creation

engines
DatabaseTypeEnum[]

Database software available on this platform

Valuesmariadbmongodbmysqlpostgresqlredis
isolation
DatabaseIsolationEnum

Technology use to isolate differents webhosting accounts

Valuesdedicatedlocalshared
quota
UnitAndValue_long

Size of data can be used

type
DatabaseCapabilitiesTypeEnum

Database offer name

ValuesextraSqlPersolocalprivateDatabasesqlLocalsqlPersosqlPro

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/databaseCreationCapabilities \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "available": 0, "engines": [ "mariadb" ], "isolation": "dedicated", "quota": { "unit": "string", "value": 0 }, "type": "extraSqlPerso" }]

List dumpsProduction

GET
/1.0/hosting/web/{serviceName}/dump

List dumps. Returns the IDs of the database dumps of the hosting, including those of deleted databases. Filter them by database, date or orphan.

Path parameters

serviceName
required
string

The internal name of your hosting

Query parameters

creationDate.from
stringdate-time

Filter the value of creationDate property (>=)

creationDate.to
stringdate-time

Filter the value of creationDate property (<=)

databaseName
string

Filter the value of databaseName property (=)

deletionDate.from
stringdate-time

Filter the value of deletionDate property (>=)

deletionDate.to
stringdate-time

Filter the value of deletionDate property (<=)

orphan
boolean

Filter the value of orphan property (=)

Response

200integer[]successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/dump \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Get a dumpProduction

GET
/1.0/hosting/web/{serviceName}/dump/{id}

Get a dump. Returns the source database, status, type, download URL and automatic deletion date of the dump.

Path parameters

id
required
integer

Dump id

serviceName
required
string

The internal name of your hosting

Response

200dumpsuccessful operation
creationDate
read-only
stringdate-time

Creation date of the dump

databaseName
read-only
string

Source database name

deletionDate
read-only
stringdate-time

Automatic deletion date of the dump

id
read-only
integer

Dump id

orphan
read-only
boolean

If source database was deleted

status
read-only
StatusEnum

The dump status

Valuescreatedcreatingdeleting
taskId
read-only
integer

The task ID working on this dump

type
read-only
DateEnum

Dump type

Valuesdaily.1nowweekly.1
url
read-only
string

Dump url access

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/dump/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creationDate": "2024-01-01T12:00:00Z", "databaseName": "string", "deletionDate": "2024-01-01T12:00:00Z", "id": 0, "orphan": true, "status": "created", "taskId": 0, "type": "daily.1", "url": "string"}

List extra SQL optionsProduction

GET
/1.0/hosting/web/{serviceName}/extraSqlPerso

List extra SQL options. Returns the IDs of the additional SQL options of the hosting. Each option adds databases, each with its own quota.

Path parameters

serviceName
required
string

The internal name of your hosting

Response

200integer[]successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/extraSqlPerso \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Get an extra SQL optionProduction

GET
/1.0/hosting/web/{serviceName}/extraSqlPerso/{id}

Get an extra SQL option. Returns the number of databases allowed, the quota per database, the linked databases and the status of the option.

Path parameters

id
required
integer

Identifier of the (additional) SQL slot

serviceName
required
string

The internal name of your hosting

Response

200extrasqlpersosuccessful operation
database
read-only
integer

Number of database allowed by this option

id
read-only
integer

Identifier of the (additional) SQL slot

name
read-only
string

The extraSqlPerso option name

serviceName
read-only
string

Billing name of the matching subscription (or internal naming otherwise)

size
read-only
UnitAndValue_double

Quota size allowed per each database by this option

status
read-only
string

The extraSqlPerso option status

taskId
read-only
integer

The task ID working on this extraSqlPerso

usage
read-only
string[]

Linked databases

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/extraSqlPerso/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "database": 0, "id": 0, "name": "string", "serviceName": "string", "size": { "unit": "string", "value": 0 }, "status": "string", "taskId": 0, "usage": [ "string" ]}

List extra SQL option databasesProduction

GET
/1.0/hosting/web/{serviceName}/extraSqlPerso/{id}/databases

List extra SQL option databases. Returns the names of the databases linked to the additional SQL option, within its number of allowed databases.

Path parameters

id
required
integer

Identifier of the (additional) SQL slot

serviceName
required
string

The internal name of your hosting

Response

200string[]successful operation

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/extraSqlPerso/{id}/databases \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Get extra SQL option service informationProduction

GET
/1.0/hosting/web/{serviceName}/extraSqlPerso/{id}/serviceInfos

Get extra SQL option service information. Returns the billing information of the option: creation and expiration dates, renewal settings and contacts.

Path parameters

id
required
integer

Identifier of the (additional) SQL slot

serviceName
required
string

The internal name of your hosting

Response

200Servicesuccessful operation
canDeleteAtExpiration
read-only
boolean

Indicates that the service can be set up to be deleted at expiration

contactAdmin
read-only
string
—
contactBilling
read-only
string
—
contactTech
read-only
string
—
creation
read-only
stringdate
—
domain
read-only
string
—
engagedUpTo
read-only
stringdate
—
expiration
read-only
stringdate
—
possibleRenewPeriod
read-only
integer[]

All the possible renew period of your service in month

renew
RenewType

Way of handling the renew

renewalType
read-only
RenewalTypeEnum

Detailed renewal type of a service

ValuesautomaticForcedProductautomaticV2012automaticV2014automaticV2016automaticV2024manualoneShotoption
serviceId
read-only
integer
—
status
read-only
StateEnum
—
ValuesautorenewInProgressexpiredinCreationokpendingDebtunPaid

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/extraSqlPerso/{id}/serviceInfos \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "canDeleteAtExpiration": true, "contactAdmin": "string", "contactBilling": "string", "contactTech": "string", "creation": "2024-01-01", "domain": "string", "engagedUpTo": "2024-01-01", "expiration": "2024-01-01", "possibleRenewPeriod": [ 0 ], "renew": { "automatic": true, "deleteAtExpiration": true, "forced": true, "manualPayment": true, "period": 0 }, "renewalType": "automaticForcedProduct", "serviceId": 0, "status": "autorenewInProgress"}

Get private database creation capabilitiesProduction

GET
/1.0/hosting/web/{serviceName}/privateDatabaseCreationCapabilities

Get private database creation capabilities. Returns, for each private database offer, the engines, the quota and the number of databases left to create.

Path parameters

serviceName
required
string

The internal name of your hosting

Response

200CreationDatabaseCapabilities[]successful operation
available
integer

Number of database left for creation

engines
DatabaseTypeEnum[]

Database software available on this platform

Valuesmariadbmongodbmysqlpostgresqlredis
isolation
DatabaseIsolationEnum

Technology use to isolate differents webhosting accounts

Valuesdedicatedlocalshared
quota
UnitAndValue_long

Size of data can be used

type
DatabaseCapabilitiesTypeEnum

Database offer name

ValuesextraSqlPersolocalprivateDatabasesqlLocalsqlPersosqlPro

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/privateDatabaseCreationCapabilities \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "available": 0, "engines": [ "mariadb" ], "isolation": "dedicated", "quota": { "unit": "string", "value": 0 }, "type": "extraSqlPerso" }]

List linked private databasesProduction

GET
/1.0/hosting/web/{serviceName}/privateDatabases

List linked private databases. Returns the service names of the private databases linked to the hosting.

Path parameters

serviceName
required
string

The internal name of your hosting

Response

200string[]successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/privateDatabases \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Create a databaseProduction

POST
/1.0/hosting/web/{serviceName}/database

Create a database. Creates a MariaDB, MySQL, PostgreSQL or Redis database with its user, and returns the task. The quota applies only to extraSqlPerso databases.

Path parameters

serviceName
required
string

The internal name of your hosting

Request body (required)

capabilitie
required
DatabaseCapabilitiesTypeEnum

Type of your database

ValuesextraSqlPersolocalprivateDatabasesqlLocalsqlPersosqlPro
password
stringpassword

Database password

quota
ExtraSqlQuotaEnum

Quota assign to your database. Only for extraSql

Values251002002564005128001024
type
required
DatabaseCreationTypeEnum

Type you want for your database

Valuesmariadbmysqlpostgresqlredis
user
required
string

Database user name. Must begin with your hosting login and must be in lower case

version
VersionEnum

Version you want for your database following the type

Values1010.110.1110.210.310.410.510.6111213153.23.44.05.15.55.65.76.07.08.08.49.49.59.6

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Change the database passwordProduction

POST
/1.0/hosting/web/{serviceName}/database/{name}/changePassword

Change the database password. Changes the password of the database user and returns the task. Available when changePassword is true in the database capabilities.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Request body (required)

password
required
stringpassword

The new database password

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/changePassword \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Create a database copyProduction

POST
/1.0/hosting/web/{serviceName}/database/{name}/copy

Create a database copy. Creates a copy of the database, kept until its expiration date. Restore it later with copyRestore.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200copysuccessful operation
creationDate
read-only
stringdate-time

Creation date

expirationDate
read-only
stringdate-time

Expiration date

id
read-only
stringuuid

Copy id

lastUpdate
read-only
stringdate-time

Last update date

status
read-only
StatusEnum

Copy status

Valuesdoingdoneerrortodo

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/copy \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creationDate": "2024-01-01T12:00:00Z", "expirationDate": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "lastUpdate": "2024-01-01T12:00:00Z", "status": "doing"}

Restore a database copyProduction

POST
/1.0/hosting/web/{serviceName}/database/{name}/copyRestore

Restore a database copy. Restores a copy into the database and returns the task. Set flushDatabase to true to empty the database first.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Request body (required)

copyId
required
stringuuid

UUID of the copy to restore

flushDatabase
boolean

If database will be flushed before importing the dump. Default: false

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/copyRestore \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Create a database dumpProduction

POST
/1.0/hosting/web/{serviceName}/database/{name}/dump

Create a database dump. Creates a dump of the current database or of a daily or weekly backup, and returns the task. An email is sent when the dump is ready, unless sendEmail is false.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Request body (required)

date
required
DateEnum

The date you want to dump

Valuesdaily.1nowweekly.1
sendEmail
boolean

Send an email when dump will be available? Default: true

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/dump \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Restore a database dumpProduction

POST
/1.0/hosting/web/{serviceName}/database/{name}/dump/{id}/restore

Restore a database dump. Restores the dump into the database and returns the task. The current content of the database is replaced by the dump.

Path parameters

id
required
integer

Dump id

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses id = 0, name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/dump/{id}/restore \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Import a dumpProduction

POST
/1.0/hosting/web/{serviceName}/database/{name}/import

Import a dump. Imports a dump file uploaded with /me/documents into the database, and returns the task. Set flushDatabase to true to empty the database first.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Request body (required)

documentId
required
string

Documents ID of the dump from /me/documents

flushDatabase
boolean

If database will be flushed before importing the dump. Default: false

sendEmail
boolean

Send an email when the import will be done? Default: false

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/import \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Run a database actionProduction

POST
/1.0/hosting/web/{serviceName}/database/{name}/request

Run a database action. Runs an action on the database and returns the task. CHECK_QUOTA refreshes the space used by the database.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Request body (required)

action
required
RequestActionEnum

Action you want to request

ValuesCHECK_QUOTA

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/request \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Restore a database backupProduction

POST
/1.0/hosting/web/{serviceName}/database/{name}/restore

Restore a database backup. Restores the database from a daily or weekly backup and returns the task. Set sendEmail to true to receive an email when it is done.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Request body (required)

date
required
DateEnum

The date you want to dump

Valuesdaily.1nowweekly.1
sendEmail
boolean

Send an email when the restore will be done? Default: false

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/restore \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Update extra SQL option renewalProduction

POST
/1.0/hosting/web/{serviceName}/extraSqlPerso/{id}/serviceInfosUpdate

Update extra SQL option renewal. Updates the renewal settings of the additional SQL option: automatic renewal, renewal period and deletion at expiration.

Path parameters

id
required
integer

Identifier of the (additional) SQL slot

serviceName
required
string

The internal name of your hosting

Request body (required)

renew
required
RenewType

Renew type

Response

200—successful operation

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/extraSqlPerso/{id}/serviceInfosUpdate \
  -H "authorization: Bearer $OVH_TOKEN"

Terminate an extra SQL optionProduction

POST
/1.0/hosting/web/{serviceName}/extraSqlPerso/{id}/terminate

Terminate an extra SQL option. Requests the termination of the additional SQL option. A link to confirm it is sent by email to the administrator contact.

Path parameters

id
required
integer

Identifier of the (additional) SQL slot

serviceName
required
string

The internal name of your hosting

Response

200stringsuccessful operation

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/extraSqlPerso/{id}/terminate \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
"string"

Delete a databaseProduction

DELETE
/1.0/hosting/web/{serviceName}/database/{name}

Delete a database. Deletes the database and returns the task. Its dumps are kept until their automatic deletion date.

Path parameters

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Delete a database copyProduction

DELETE
/1.0/hosting/web/{serviceName}/database/{name}/copy/{id}

Delete a database copy. Deletes the database copy before its expiration date. The database itself is not changed.

Path parameters

id
required
stringuuid

Copy id

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200—successful operation

Example uses id = 00000000-0000-0000-0000-000000000000, name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/copy/{id} \
  -H "authorization: Bearer $OVH_TOKEN"

Delete a database dumpProduction

DELETE
/1.0/hosting/web/{serviceName}/database/{name}/dump/{id}

Delete a database dump. Deletes the dump before its automatic deletion date and returns the task. Otherwise, the dump is deleted on that date.

Path parameters

id
required
integer

Dump id

name
required
string

Database name (like mydb.mysql.db or mydb.postgres.db)

serviceName
required
string

The internal name of your hosting

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses id = 0, name = string, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/database/{name}/dump/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Delete a dumpProduction

DELETE
/1.0/hosting/web/{serviceName}/dump/{id}

Delete a dump. Deletes the dump before its automatic deletion date and returns the task. This also applies to dumps of deleted databases.

Path parameters

id
required
integer

Dump id

serviceName
required
string

The internal name of your hosting

Response

200tasksuccessful operation
doneDate
read-only
stringdate-time

Completion date

function
read-only
string

Function name

id
read-only
integer

the id of the task

lastUpdate
read-only
stringdate-time

last update

objectId
read-only
string

Task related object ID

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebd
startDate
read-only
stringdate-time

Task Creation date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneerrorinittodo

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/dump/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "string", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}