Internal implementation reference
POST /operations
Create operation. Permissions, parameters, responses and examples.
Private service protocols are unsupported for external integration. Their schemas describe source declarations; they are not public service endpoints.
Read pinned handler: services/scanner/kodesec_scanner/updater_routes.py:39
Create operation
Create operation through POST /operations. The parameters and declared response shapes below come from this exact source snapshot.
Internal protocol; unsupported for external integration. This page makes no request to a local installation.
Authority
Private service protocol. No public or third-party integration authority.
Parameters and headers
No explicit path, query or header parameters are declared here. The authority boundary still applies.
Request body
JSON body · required · OperationRequest
| Field | Type | Presence |
|---|---|---|
attempt | integer | Required |
catalog_digest | string | null | Optional |
kind | string | Required |
max_attempts | integer | Required |
operation_id | string | Required |
preparation_budget | PreparationBudget | null | Optional |
reconciliation_budget | RecoveryBudget | null | Optional |
reconciliation_target | RecoveryTarget | null | Optional |
request_digest | string | Required |
requested_components | array | Required |
schema_version | integer | Required |
Complete declared request schema
{
"additionalProperties": false,
"properties": {
"attempt": {
"maximum": 3,
"minimum": 1,
"title": "Attempt",
"type": "integer"
},
"catalog_digest": {
"anyOf": [
{
"pattern": "^[0-9a-f]{64}$",
"type": "string"
},
{
"type": "null"
}
],
"title": "Catalog Digest"
},
"kind": {
"enum": [
"catalog_check",
"cache_update",
"cache_rollback",
"cache_reconcile"
],
"title": "Kind",
"type": "string"
},
"max_attempts": {
"maximum": 3,
"minimum": 1,
"title": "Max Attempts",
"type": "integer"
},
"operation_id": {
"format": "uuid",
"title": "Operation Id",
"type": "string"
},
"preparation_budget": {
"anyOf": [
{
"$ref": "#/components/schemas/PreparationBudget"
},
{
"type": "null"
}
]
},
"reconciliation_budget": {
"anyOf": [
{
"$ref": "#/components/schemas/RecoveryBudget"
},
{
"type": "null"
}
]
},
"reconciliation_target": {
"anyOf": [
{
"$ref": "#/components/schemas/RecoveryTarget"
},
{
"type": "null"
}
]
},
"request_digest": {
"pattern": "^[0-9a-f]{64}$",
"title": "Request Digest",
"type": "string"
},
"requested_components": {
"items": {
"type": "string"
},
"maxItems": 32,
"title": "Requested Components",
"type": "array"
},
"schema_version": {
"enum": [
1,
2,
3
],
"title": "Schema Version",
"type": "integer"
}
},
"required": [
"schema_version",
"operation_id",
"request_digest",
"kind",
"requested_components",
"attempt",
"max_attempts"
],
"title": "OperationRequest",
"type": "object"
}Responses
| Status | Meaning and declared shape |
|---|---|
200 | OK application/json · OperationRecord |
202 | Successful Response application/json · OperationRecord |
409 | Refresh current revision and identity. A conflicting command must not be blindly repeated. See source-linked error catalog. |
422 | Validation Error application/json · HTTPValidationError |
503 | Check readiness and the recorded job state. A healthy control plane does not prove scanner readiness. See source-linked error catalog. |
An empty or broad schema preserves the source contract. It is not a promise of an empty response.
Source-linked errors
Literal HTTP errors in this handler and same-file helper call graph, plus control middleware. Dynamic and cross-module failures may add other errors; source links are authoritative.
3 source error observations
| Status | Source detail | Recovery |
|---|---|---|
| 409 ↗ | operation_conflict | Refresh current revision and identity. A conflicting command must not be blindly repeated. |
| 503 ↗ | updater_capacity | Check readiness and the recorded job state. A healthy control plane does not prove scanner readiness. |
| 422 ↗ | operation_rejected | Correct the field or semantic validation error. Input values are omitted from control validation errors. |
Synthetic examples
These examples validate declared JSON shapes and formats. They contain no real installation data and do not prove runtime admission, cross-field validation, authority or successful work.
Request JSON
{
"attempt": 1,
"kind": "catalog_check",
"max_attempts": 1,
"operation_id": "00000000-0000-4000-8000-000000000001",
"request_digest": "0000000000000000000000000000000000000000000000000000000000000000",
"requested_components": [],
"schema_version": 1
}Response 200 JSON
{
"attempt": 1,
"created_at": "synthetic",
"kind": "catalog_check",
"max_attempts": 1,
"operation_id": "00000000-0000-4000-8000-000000000001",
"request_digest": "0000000000000000000000000000000000000000000000000000000000000000",
"requested_components": [],
"schema_version": 1,
"stage": "synthetic",
"status": "queued",
"updated_at": "synthetic"
}Response 202 JSON
{
"attempt": 1,
"created_at": "synthetic",
"kind": "catalog_check",
"max_attempts": 1,
"operation_id": "00000000-0000-4000-8000-000000000001",
"request_digest": "0000000000000000000000000000000000000000000000000000000000000000",
"requested_components": [],
"schema_version": 1,
"stage": "synthetic",
"status": "queued",
"updated_at": "synthetic"
}All referenced models remain in its components section. Browse control model definitions.