palbaseDocs

Palbase ai · API

POST/ai/agents/{name}/rollback

Go back to a version

Makes a version it had the one its chats talk to, and its draft that version: a change of the draft not published is dropped.

Called by your server, with the project's secret key.

Path

namestring · requiredThe name: lowercase letters, digits, _ and -, starting with a letter, at most 64.

Request body

revisioninteger · optionalThe draft's revision as it was looked at: going back drops a change of the draft not published, and one saved since is not dropped unseen (draft_changed).
versioninteger · requiredA version it had.
curl
curl -X POST "https://<your-ref>.palbase.studio/ai/agents/<name>/rollback" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"version":1}'

Responses

200The agent

400The request is malformed, or names what this module does not offer (the error names which)

401No valid credential

403A publishable key or a user's session: everything here is the project's server's, called with the secret key

404No such response, job or provider in this project

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation RollbackAgent of ai's contract.