Vigile
SearchContents

DocumentationOperations

restore

Bring back a deleted project, task or user. It returns to the lists with the status and links it had. Restoring a user is for admins only, and the user needs a new API key afterwards. An item that was deleted permanently cannot be restored.

The operation's own description: what an agent reads to decide whether and how to call it.
It
Changes the plan, as one step that is stored whole or not at all.
Who may call it
Every user.
Version
Takes no version: it is carried out on the plan as it is at that moment. The item it brings back is one version on.
Answers with
The task in short. Its fields. Not in it: description, why, links, timeline, created_at, created_by, updated_at and unchanged_since. get has those.
MCP tool
restore
HTTP
POST /api/restore
Command
vigile restore

Input

FieldTakesWhat it is
kind"project" | "task" | "user"optionalThe kind of item: "project", "task" or "user". Needed only when the ID alone is ambiguous.
idstringrequiredThe item's ID, or a username for a user.

A field that is not listed here is refused, as invalid_input. On the command line each field is an option, with hyphens for underscores: --kind.

Example

The same call three ways, as agent1. It was made on the demo plan after a few changes that set the scene. Over HTTP and MCP, a call without a key acts as agent1 on a new instance.

Command line

vigile restore --id APP-016 --as agent1

HTTP

curl -s http://127.0.0.1:8700/api/restore \
  -H 'content-type: application/json' \
  -d '{"id":"APP-016"}'

MCP tool call

{
  "name": "restore",
  "arguments": { "id": "APP-016" }
}

The answer

{
  "kind": "task",
  "id": "APP-016",
  "title": "Home screen shows the latest orders",
  "type": "task",
  "status": "open",
  "priority": 4,
  "value": null,
  "size": null,
  "version": 3,
  "contained_in": ["APP"],
  "depends_on": [],
  "assigned_to": [],
  "is_assigned": false,
  "is_next": true,
  "is_waiting": false,
  "waiting_for": [],
  "has_problems": false
}

This is what a service answered when this page was built. Over HTTP it is the body of the response, over MCP the text of the tool result, and the command line prints it in words unless given --json.

What it answers

The item in short, as it is again: with the status and the links it had, and a version one higher.

Rules

  • It takes no version: there is nothing to overwrite.
  • A restored task holds back what depends on it again, if it is unfinished. That can leave a problem on a task that went on meanwhile.
  • Restoring a user is for admins. The user comes back without a key: issue one with reset_user_key.
  • An item that was deleted for good cannot be restored.

Errors

  • rule_violation with not_deleted: the item is not deleted.
  • forbidden: the caller is not an admin and the item is a user.
  • not_found: nothing matches the ID, as after a permanent delete.
  • internal, "User … was restored. The key it had before no longer counts": the user is back. Issue its new key with reset_user_key, which it needs in any case.