pagehive

complete_commands

Close up to 50 queued commands in one call, each as done or failed with an optional note, with the same rules as complete_command.

Agent commandsChanges dataAll plans

What it does

Close up to 50 queued commands in one call, each as done or failed with an optional note, with the same rules as complete_command. A bad argument refuses the whole call. A command that can't be closed (already finished, claimed by another run, not found) gets ok false and its error in results; the others still close. results keep the order given.

Plans

Works on every plan: Free, Basic, Pro and Ultra.

Parameters

NameTypeAbout
site_idrequiredstringThe id of the site. list_sites gives the ids of your sites.
commandsrequiredarray of objectsUp to 50 items, each { command_id, status (done or failed), note (optional, up to 1000 characters) }.

Example

Call complete_commands with these arguments:

{
  "site_id": "01a1…",
  "commands": [
    {
      "command_id": "01a1…",
      "status": "done",
      "note": "Added 3 recipes."
    },
    {
      "command_id": "01a1…",
      "status": "failed",
      "note": "The photo link was broken."
    }
  ]
}

Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.

Related guides