Skip to main content

Documentation Index

Fetch the complete documentation index at: https://alphabet-06152314.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The scheduler admin endpoints provide system-wide controls intended for maintenance windows and disaster recovery. Every endpoint under /api/v1/scheduler/admin requires the AdminOnly authorization policy — ordinary authenticated users cannot access them.

Pause all jobs

POST /api/v1/scheduler/admin/pause-all
Suspends every active scheduler job in the system. Use this before maintenance windows to prevent jobs from running while infrastructure is being updated.

Response

200 OK — all active jobs were paused successfully. 400 Bad Request — returns ProblemDetails if the operation could not be completed.
This endpoint affects every enabled job in the system. Confirm you intend a system-wide pause before calling this endpoint.

Resume all jobs

POST /api/v1/scheduler/admin/resume-all
Restores all paused jobs and re-registers their schedules in Hangfire. Call this after a maintenance window to return the scheduler to normal operation.

Response

200 OK — all jobs were resumed and their schedules re-registered. 400 Bad Request — returns ProblemDetails if the operation could not be completed.

Clear old execution logs

DELETE /api/v1/scheduler/admin/clear-logs
Deletes execution records older than the specified number of days and returns the count of deleted records. Use this to manage database growth during routine maintenance.

Request body

olderThanDays
integer
required
Age threshold in days. Execution records with a completion timestamp older than this value are deleted.

Response

200 OK — returns the count of deleted execution records as a plain integer. 400 Bad Request — returns ProblemDetails if olderThanDays is missing or invalid.
Deleted execution records cannot be recovered. Consider exporting job configurations before clearing logs if you need an audit trail.

Example

curl -X DELETE "https://api.example.com/api/v1/scheduler/admin/clear-logs" \
  -H "Authorization: Bearer <admin-token>" \
  -H "Content-Type: application/json" \
  -d '{ "olderThanDays": 90 }'

Export job configurations

GET /api/v1/scheduler/admin/export
Downloads all current job definitions as a JSON file (scheduler-jobs-export.json). Use the exported file for backup, environment migration, or version-controlled job configuration.

Response

200 OK — returns a file download with Content-Type: application/json and filename scheduler-jobs-export.json.

Example

curl -X GET "https://api.example.com/api/v1/scheduler/admin/export" \
  -H "Authorization: Bearer <admin-token>" \
  -o scheduler-jobs-export.json

Import job configurations

POST /api/v1/scheduler/admin/import
Creates scheduler jobs from a JSON payload previously produced by the export endpoint. Returns the number of jobs successfully imported.

Request body

jsonPayload
string
required
The raw JSON string exported from GET /api/v1/scheduler/admin/export. Pass the file contents as a JSON-encoded string.

Response

200 OK — returns the count of imported jobs as a plain integer. 400 Bad Request — returns ProblemDetails if the payload is missing, malformed, or any job definition fails validation.

Example

# Export from source environment
curl -X GET "https://api.source.com/api/v1/scheduler/admin/export" \
  -H "Authorization: Bearer <admin-token>" \
  -o scheduler-jobs-export.json

# Import into target environment
curl -X POST "https://api.target.com/api/v1/scheduler/admin/import" \
  -H "Authorization: Bearer <admin-token>" \
  -H "Content-Type: application/json" \
  -d "{\"jsonPayload\": $(jq -Rs . < scheduler-jobs-export.json)}"

Hangfire dashboard

For visual monitoring of queued, scheduled, and failed jobs, the Hangfire dashboard is available at /hangfire. Access to this dashboard is restricted to users with the AdminOnly policy.
Use the Hangfire dashboard to inspect individual job queue state and manually requeue failed jobs when needed. It complements the API endpoints described on this page.