Skip to main content

Pause / Resume API

Control processing at both the individual source level and system-wide. Pausing prevents new extraction and indexing work from starting; resuming re-queues any paused sources for recovery.

Eight endpoints are split across two path prefixes:

  • Per-source endpoints are mounted at /api/v1/sources
  • System-wide endpoints are mounted at /api/v1/system/processing

Per-Source Pause / Resume

Pause Single Source

POST /api/v1/sources/{source_id}/pause

Pause processing for a single source. The source will not be picked up for extraction or recovery until it is resumed.

curl -X POST http://localhost:8080/api/v1/sources/src_abc123/pause \
-H "Content-Type: application/json" \
-d '{"reason": "Reviewing extraction settings"}'
ParameterTypeRequiredDefaultDescription
source_idstring (path)Yes--Source ID
reasonstring (body)NonullOptional human-readable reason (max 500 characters)

Response 200 OK

{
"source_id": "src_abc123",
"paused": true
}

Resume Single Source

POST /api/v1/sources/{source_id}/resume

Resume a paused source and immediately trigger recovery so it re-queues for any pending processing.

curl -X POST http://localhost:8080/api/v1/sources/src_abc123/resume
ParameterTypeRequiredDescription
source_idstring (path)YesSource ID

Response 200 OK

{
"source_id": "src_abc123",
"paused": false
}

Bulk Pause Sources

POST /api/v1/sources/pause

Pause multiple sources in a single request. Returns the count of sources successfully paused.

curl -X POST http://localhost:8080/api/v1/sources/pause \
-H "Content-Type: application/json" \
-d '{
"source_ids": ["src_abc123", "src_def456"],
"reason": "Maintenance window"
}'
ParameterTypeRequiredDefaultDescription
source_idsstring[] (body)Yes--List of source IDs to pause (1--500 items)
reasonstring (body)NonullOptional reason applied to all sources (max 500 characters)

Response 200 OK

{
"count": 2
}

Bulk Resume Sources

POST /api/v1/sources/resume

Resume multiple sources in a single request. Each resumed source immediately triggers recovery.

curl -X POST http://localhost:8080/api/v1/sources/resume \
-H "Content-Type: application/json" \
-d '{
"source_ids": ["src_abc123", "src_def456"]
}'
ParameterTypeRequiredDescription
source_idsstring[] (body)YesList of source IDs to resume (1--500 items)

Response 200 OK

{
"count": 2
}

System-Wide Pause / Resume

These endpoints affect all processing across the entire database, not just individual sources.

Pause System Processing

POST /api/v1/system/processing/pause

Pause all source processing system-wide. No new extraction or indexing jobs will be started until the system is resumed. Existing in-flight tasks are not interrupted.

curl -X POST http://localhost:8080/api/v1/system/processing/pause \
-H "Content-Type: application/json" \
-d '{"reason": "Scheduled maintenance"}'
ParameterTypeRequiredDefaultDescription
reasonstring (body)NonullOptional reason for the pause (max 500 characters)

Response 200 OK

{
"paused": true
}

Resume System Processing

POST /api/v1/system/processing/resume

Resume system-wide processing after a system pause.

curl -X POST http://localhost:8080/api/v1/system/processing/resume

Response 200 OK

{
"paused": false
}

Get System Pause Status

GET /api/v1/system/processing/status

Returns the current system-wide pause state, including when the pause started and the reason if provided.

curl http://localhost:8080/api/v1/system/processing/status

Response 200 OK -- SystemPauseStatusResponse

{
"paused": true,
"paused_at": "2026-04-13T09:00:00",
"reason": "Scheduled maintenance"
}

When the system is not paused:

{
"paused": false,
"paused_at": null,
"reason": null
}

List System Events

GET /api/v1/system/processing/events

Returns an audit trail of recent system-level events. Useful for monitoring and diagnosing pause / resume activity, health changes, task failures, and recovery operations.

curl "http://localhost:8080/api/v1/system/processing/events?event_type=pause&limit=20"
ParameterTypeRequiredDefaultDescription
event_typestring (query)NonullFilter by event type: pause, resume, health_change, task_failed, recovery
limitint (query)No50Maximum number of events to return

Response 200 OK -- list[object]

[
{
"id": "evt_001",
"event_type": "pause",
"created_at": "2026-04-13T09:00:00",
"reason": "Scheduled maintenance",
"database_name": "default"
},
{
"id": "evt_002",
"event_type": "resume",
"created_at": "2026-04-13T10:30:00",
"reason": null,
"database_name": "default"
}
]

Clear System Events

DELETE /api/v1/system/processing/events

Permanently deletes all system events from the audit log.

curl -X DELETE http://localhost:8080/api/v1/system/processing/events

Response 200 OK

{
"deleted": 42
}
FieldTypeDescription
deletedintNumber of events removed

Response Models

SystemPauseStatusResponse

FieldTypeDescription
pausedboolWhether system-wide processing is currently paused
paused_atdatetime?When the system was paused (null if not paused)
reasonstring?Reason provided when pausing (null if none given)