Skip to content
Streamkap
Esc
↑↓navigate↵open⌘Jpreview

Rollback Agent Config

Roll a config-based agent back to a historical version.

Writes a new version N+1 whose config equals the target’s stored snapshot, records change_kind='rollback' + rollback_source_version on the new history row, and redeploys the agent. Never a pointer swap, never destructive. If current validators reject the historical config (validator tightening between then and now), returns 422 with Pydantic’s error text so the FE can highlight the offending fields.

POST/agents/{job_id}/config/rollback
Authorization
AuthorizationBearer token · headerrequired
Path parameters
job_idstringrequired
Request body
requiredapplication/json
targetVersionintegerrequired

The existing version number whose config will be copied into a new version. Version 0 is the initial change_kind='create' snapshot.

min 0
notestring | null

Optional user-supplied context - recorded on the new rollback row.

Show properties
Any of:
string
string
null
null
Responses
200

Successful Response

_idstringrequired
namestringrequired
job_typeapp__models__api__agents_api_models__flink_jobs__FlinkJobTypeEnumrequired
Allowed:pyflinkjaragent_configknowledge_base
statusFlinkJobStatusEnumrequired
Allowed:CREATEDDEPLOYINGRUNNINGCANCELLINGCANCELLEDFAILEDFINISHED
desired_statusFlinkJobStatusEnum | null
Show properties
Any of:
FlinkJobStatusEnum
string
null
null
flink_job_namestringrequired
flink_job_idstring | null
Show properties
Any of:
string
string
null
null
parallelisminteger
default: 1
error_messagestring | null
Show properties
Any of:
string
string
null
null
agent_configobject | null
Show properties
Any of:
object
object
null
null
created_bystring | null
Show properties
Any of:
string
string
null
null
created_timestampstring<date-time> | null
Show properties
Any of:
string<date-time>
string<date-time>
null
null
updated_timestampstring<date-time> | null
Show properties
Any of:
string<date-time>
string<date-time>
null
null
422

Validation Error

detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
curl -X POST 'https://api.streamkap.com/agents/string/config/rollback' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "targetVersion": 0,
  "note": "string"
}'
Response
{
  "_id": "string",
  "name": "string",
  "job_type": "pyflink",
  "status": "CREATED",
  "desired_status": "CREATED",
  "flink_job_name": "string",
  "flink_job_id": "string",
  "parallelism": 1,
  "error_message": "string",
  "agent_config": {},
  "created_by": "string",
  "created_timestamp": "2019-08-24T14:15:22Z",
  "updated_timestamp": "2019-08-24T14:15:22Z"
}