FruxonDocs
ApiAgent reviews

Approves a recommendation card, making its change as a new revision and deploying it.

The change is made to the revision that is live now, which must be `expectedBaseRevision` — the one the admin approved against — or the call answers 409. The card is checked against it again: a change the live agent already has, or a passage to rewrite that is no longer there exactly once, closes the card (409). A tool is attached only when this workspace can run it now, and one that changes things is attached with a person's approval required before each call. The new revision is validated as a publish would be, created with the note "Improvement: {title}", and deployed to all traffic — unless another revision went live meanwhile, in which case it is kept undeployed, the card stays open, and `deployed` is false. Undo is `revisions/{previousRevision}:deploy`. Teammates' unsaved drafts on the old revision will need rebasing, as after any publish. Advice cards cannot be approved: do what they say, then dismiss them as `ALREADY_HANDLED`. Agent admins only.

POST
/v1/tenants/{tenant}/agents/{agent}/recommendations/{recommendation}:approve
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

agent*string

The agent ID.

recommendation*string

The recommendation ID.

Formatuuid
tenant*string

The tenant identifier

The live revision the change was approved against, and the card's version.

expectedBaseRevision?integer

The live revision the admin approved the change against — the one the confirmation named. When another revision has gone live since, the approval is refused rather than made on an agent the admin did not see.

Formatint64
version?integer

The card's version as the admin saw it.

Formatint32
[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/agents/string/recommendations/497f6eca-6276-4993-bfeb-53cbbbba6f08:approve" \  -H "Content-Type: application/json" \  -d '{}'
{
  "recommendation": {
    "id": "00000000-0000-0000-0000-000000000000",
    "kind": "ADD_TOOLS",
    "category": "MISSING_CAPABILITY",
    "severity": "LOW",
    "status": "CANDIDATE",
    "title": "string",
    "summary": "string",
    "need": "string",
    "patch": {
      "tools": [],
      "instructionText": "string",
      "replaceAnchor": "string",
      "adviceMarkdown": "string",
      "feature": "string"
    },
    "evidenceCount": 0,
    "firstSeenAt": 0,
    "lastSeenAt": 0,
    "baseRevision": 0,
    "appliedRevision": 0,
    "previousRevision": 0,
    "appliedBy": "string",
    "appliedAt": 0,
    "dismissedBy": "string",
    "dismissedAt": 0,
    "dismissReason": "NOT_RELEVANT",
    "dismissNote": "string",
    "obsoleteReason": "string",
    "version": 0
  },
  "revision": 0,
  "previousRevision": 0,
  "deployed": false,
  "detail": "string",
  "approvalRequiredTools": [
    "string"
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}