Skip to main content

tasks

Creates, updates, deletes, gets or lists a tasks resource.

Overview​

Nametasks
TypeResource
Idovh.hosting_private_database.tasks

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerThe id of the task
dump_idintegerDumpId on which the task is working (wire: dumpId)
database_namestringDatabase name on which the task is working (wire: databaseName)
user_namestringUser name on which the task is working (wire: userName)
done_datestring (date-time)Completion date (wire: doneDate)
functionstringFunction name (abuse, changeFtpPassword, changeRam, changeVersion, configuration/update, create, database/copy, database/copyRestore, database/create, database/delete, database/dump, database/dump/delete, database/extension/create, database/extension/delete, database/import, database/restore, database/wizard, delete, grant/create, grant/delete, grant/update, install, overquota/in, overquota/out, quotaRefresh, refresh, reopen, restart, start, stop, suspend, user/changePassword, user/create, user/delete, webhostingNetwork/disable, webhostingNetwork/enable, whitelist/create, whitelist/delete, whitelist/update)
last_updatestring (date-time)Last update (wire: lastUpdate)
start_datestring (date-time)Task creation date (wire: startDate)
statusstringTask status (cancelled, doing, done, error, todo)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, service_nameReturns the function, status and dates of the task, and the database, user or dump it works on.
listselectservice_namefunction, status, x_pagination_modeReturns the IDs of the tasks of the service.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
idintegerId
service_namestringService name (wire: serviceName)
functionstringFilter the value of function property
statusstringFilter the value of status property
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Returns the function, status and dates of the task, and the database, user or dump it works on.

SELECT
id,
dump_id,
database_name,
user_name,
done_date,
function,
last_update,
start_date,
status
FROM ovh.hosting_private_database.tasks
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;