Skip to main content
POST
/
jobs
/
trigger-job
Trigger Jobs
curl --request POST \
  --url https://api.techforgeinnovate.com/jobs/trigger-job \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "ids": [
    "<string>"
  ]
}
'

Trigger Jobs

Pushes existing jobs back onto the worker queue by UUID.

Request body

ids
string[]
required
Array of job UUID strings to requeue.
Expected JSON shape:
{
  "ids": [
    "15a6331b-3837-4ae8-8fa7-d3ead3388d77",
    "4bc42c50-3206-44d5-a194-d4feeff2b3c0"
  ]
}

Example request

curl -X POST "https://api.techforgeinnovate.com/jobs/trigger-job" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $TFI_API_KEY" \
  -d '{
    "ids": [
      "15a6331b-3837-4ae8-8fa7-d3ead3388d77",
      "4bc42c50-3206-44d5-a194-d4feeff2b3c0"
    ]
  }'

Response

Successful response:
{
  "message": "Job triggered"
}
If any supplied ID does not resolve to an existing job, the controller stops and returns:
{
  "message": "No job found"
}

Status codes

  • 201 Created when the trigger request succeeds
  • 401 Unauthorized when the key is missing or invalid