Skip to content

Latest commit

 

History

History
67 lines (54 loc) · 1.55 KB

startdb.md

File metadata and controls

67 lines (54 loc) · 1.55 KB

startdb

Start database.

Request JSON Syntax

Key Description
task task name
token token string encrypted.
dbname database name
async default "no", if "yes" run the task in asynchronous mode
  • The status of a task running in asynchronous mode can be checked using the 'gettaskstatus' api
  • Only one of these database tasks — addvoldb, backupdb, checkdb, compactdb, copydb, createdb, deletedb, loaddb, optimizedb, renamedb, restoredb, startdb, stopdb, unloaddb — can run against the same dbname at a time, whether or not async is used; a request is rejected immediately if another one of them is already running on that database

Request Sample

{
  "task":"startdb",
  "token":"cdfb4c5717170c5e237a227a2ceeccc6ae9e10c16754fb85371c0d74fa0d9d577926f07dd201b6aa",
  "dbname":"alatestdb",
  "async":"yes"
}

Response JSON Syntax

Key Description
task task name
status execution result, success or failed.
note if failed, a brief description will be given here

Response Sample

{
   "__EXEC_TIME" : "33 ms",
   "note" : "none",
   "status" : "success",
   "task" : "startdb"
}

Response Sample (async mode)

{
   "job-status" : "running",
   "note" : "none",
   "status" : "success",
   "task" : "startdb",
   "uuid" : "1877908931382247367"
}

Response Sample (rejected: database busy)

{
   "job-status" : "rejected",
   "note" : "database 'xyz' is busy with another task ('createdb')",
   "status" : "failure",
   "task" : "startdb"
}