Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

Compact session

Queue a durable session compaction request.

POST/api/session/{sessionID}/compact
Path parameters
sessionIDobjectrequired
Request body
requiredapplication/json
idobject | any
Show properties
Any of:
object
object
any
any
Responses
200Success
dataSessionInput.Compactionrequired
Show properties
typestringrequired
Allowed:compaction
admittedSeqobjectrequired
Show properties
object
idobjectrequired
Show properties
object
sessionIDobjectrequired
Show properties
object
timeCreatednumberrequired
handledSeqobject
Show properties
object
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
404SessionNotFoundError
Any of:
SessionNotFoundError
_tagstringrequired
Allowed:SessionNotFoundError
sessionIDstringrequired
messagestringrequired
SessionNotFoundError
_tagstringrequired
Allowed:SessionNotFoundError
sessionIDstringrequired
messagestringrequired
409ConflictError
_tagstringrequired
Allowed:ConflictError
messagestringrequired
resourcestring | any
Show properties
Any of:
string
string
any
any
Request
curl -X POST "/api/session/%5Bobject%20Object%5D/compact" \
  -H "Content-Type: application/json" \
  -d '{
  "id": {}
}'
Response
{
  "data": {
    "type": "compaction",
    "admittedSeq": {},
    "id": {},
    "sessionID": {},
    "timeCreated": 0,
    "handledSeq": {}
  }
}