Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

Stage session revert

Stage or move a reversible session boundary and optionally apply its file changes.

POST/api/session/{sessionID}/revert/stage
Path parameters
sessionIDobjectrequired
Request body
requiredapplication/json
messageIDobjectrequired
Show properties
object
filesboolean | any
Show properties
Any of:
boolean
boolean
any
any
Responses
200Success
dataSession.Revertrequired
Show properties
messageIDobjectrequired
Show properties
object
partIDstring
snapshotstring
filesFileDiff.Info[]
Show properties
Array of FileDiff.Info
filestringrequired
patchstringrequired
additionsobjectrequired
Show properties
object
deletionsobjectrequired
Show properties
object
statusstringrequired
Allowed:addeddeletedmodified
400InvalidRequestError
_tagstringrequired
Allowed:InvalidRequestError
messagestringrequired
kindstring | any
Show properties
Any of:
string
string
any
any
fieldstring | any
Show properties
Any of:
string
string
any
any
401UnauthorizedError
_tagstringrequired
Allowed:UnauthorizedError
messagestringrequired
404MessageNotFoundError | SessionNotFoundError
Any of:
MessageNotFoundError
_tagstringrequired
Allowed:MessageNotFoundError
sessionIDstringrequired
messageIDstringrequired
messagestringrequired
SessionNotFoundError
_tagstringrequired
Allowed:SessionNotFoundError
sessionIDstringrequired
messagestringrequired
SessionNotFoundError
_tagstringrequired
Allowed:SessionNotFoundError
sessionIDstringrequired
messagestringrequired
409SessionBusyError
_tagstringrequired
Allowed:SessionBusyError
sessionIDstringrequired
messagestringrequired
500UnknownError
_tagstringrequired
Allowed:UnknownError
messagestringrequired
refstring | any
Show properties
Any of:
string
string
any
any
Request
curl -X POST "/api/session/%5Bobject%20Object%5D/revert/stage" \
  -H "Content-Type: application/json" \
  -d '{
  "messageID": {},
  "files": true
}'
Response
{
  "data": {
    "messageID": {},
    "partID": "string",
    "snapshot": "string",
    "files": [
      {
        "file": "string",
        "patch": "string",
        "additions": {},
        "deletions": {},
        "status": "added"
      }
    ]
  }
}