AI API
Navigator questions and natural-language commands (plan, preview, confirm).
Objects
- Question → answer (Navigator):
POST /copilot/questions. The answer is built only from what the identity may see;suggested_actionsare suggestions (a pipeline request or a command), never actions. Every call is in the AI log. - Command: a natural-language instruction for one screen (
portfolio,blotter,monitor,wfrules), planned as typed actions and previewed. Nothing runs at planning time.
Command life cycle
POST /commands/{screen} → previewed (or question: answer it with answer_to)
POST /commands/{id}/execute + X-Vestoris-Confirm: <confirm_token>[; typed="CONFIRM n"] → executed
POST /commands/{id}/cancel → cancelled- The
previewlists every item before and after, what is left out and why. - Large or destructive plans (more than 10 items, cancels, totals above the approval threshold) also need the
typed_confirmationphrase in the header. - If the data changed since the preview, nothing runs: you get 412 with a new preview to check.
- Executing needs the scope
commands:execute; each item still goes through the normal services (permissions, compliance, four eyes). Trades are never placed by a Portfolio Center command: they become pipeline requests.
Endpoints
| Call | What it does | Scope |
|---|---|---|
POST/copilot/questions | Ask Navigator (answers only from what you may see; logged) | ai:use |
POST/commands/{screen} | Plan a natural-language command and preview it (screen: portfolio, blotter, monitor, wfrules); nothing runs | ai:use |
GET/commands/{id} | A command with its plan, preview and results | ai:use |
POST/commands/{id}/execute | Execute the previewed plan (X-Vestoris-Confirm: the preview token; "typed" for large or destructive plans) | commands:execute |
POST/commands/{id}/cancel | Cancel a previewed command | ai:use |