FruxonDocs
ApiKnowledge bases

Shows what upgrading a managed source to its recipe's current version would do, changing nothing.

The source is re-built at the current version from the settings it stored and compared with what is deployed: per agent, unchanged or the prompt as a line diff plus model, tool and contract changes; per stage of the automation, the fields that change; the settings a newer version introduced; the live items and anything the drain would wait for; whether and how far it can be rolled back; and every reason it cannot be confirmed now — forked or linked, already current, a version that moves only by replacement, an upgrade or settings change already under way, a missing resource, or live items that would fail a newly required field. An empty diff is a stamp-only upgrade. Confirm with `:upgrade` and the returned `planHash`.

POST
/v1/tenants/{tenant}/knowledgeBases/{knowledgeBase}/sources/{source}:previewUpgrade
AuthorizationBearer <token>

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

In: header

Path Parameters

knowledgeBase*string

The knowledge base id.

Formatuuid
source*string

The knowledge source id.

Formatuuid
tenant*string

The tenant identifier

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/knowledgeBases/497f6eca-6276-4993-bfeb-53cbbbba6f08/sources/497f6eca-6276-4993-bfeb-53cbbbba6f08:previewUpgrade"
{
  "recipeKey": "string",
  "ownerKind": "KNOWLEDGE_SOURCE",
  "ownerId": "00000000-0000-0000-0000-000000000000",
  "fromVersion": 0,
  "toVersion": 0,
  "kind": "AGENTS_ONLY",
  "stampOnly": false,
  "steps": [
    {
      "version": 0,
      "kind": "AGENTS_ONLY",
      "operatorNote": "string"
    }
  ],
  "agents": [
    {
      "role": "SOURCE",
      "agentId": "string",
      "action": "UNCHANGED",
      "deployedRevision": 0,
      "deployedHash": "string",
      "targetHash": "string",
      "builtByAnotherOwner": false,
      "diff": {
        "prompts": [],
        "models": [],
        "toolsAdded": [],
        "toolsRemoved": [],
        "toolsChanged": [],
        "outputContractChanged": false,
        "otherChanges": []
      }
    }
  ],
  "automation": {
    "triggerId": "00000000-0000-0000-0000-000000000000",
    "action": "UNCHANGED",
    "deployedHash": "string",
    "targetHash": "string",
    "stages": [
      {
        "stageId": "string",
        "change": "UNSPECIFIED",
        "fields": []
      }
    ],
    "otherChanges": [
      {
        "field": "string",
        "from": "string",
        "to": "string"
      }
    ]
  },
  "newSettings": {},
  "liveItems": {
    "live": [
      {
        "stageId": "string",
        "status": "UNSPECIFIED",
        "count": 0
      }
    ],
    "wouldFail": [
      {
        "stageId": "string",
        "path": "string",
        "count": 0,
        "sampleItemKeys": null
      }
    ]
  },
  "inFlight": [
    {
      "stageId": "string",
      "count": 0,
      "description": "string"
    }
  ],
  "reversible": {
    "reversible": false,
    "caveats": [
      "string"
    ]
  },
  "refusals": [
    {
      "code": "NOT_UPGRADABLE",
      "message": "string"
    }
  ],
  "canUpgrade": false,
  "planHash": "string"
}
Empty
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}