Newer
Older
description: Run Gears on distributed computing
get:
description: List all jobs
responses:
200:
body:
application/json:
Colton Leekley-Winslow
committed
example: !include ../examples/output/job-list.json
schema: !include ../schemas/output/job-list.json
/add:
description: Add a job
post:
body:
application/json:
Colton Leekley-Winslow
committed
example: !include ../examples/input/job-new.json
responses:
200:
body:
application/json:
example: |
{
"_id": "573cb66b135d87002660597c"
}
schema: !include ../schemas/output/job-new.json
/next:
description: Used by the engine
get:
description: Get the next job in the queue
responses:
200:
body:
application/json:
example: !include ../examples/output/job-next.json
schema: !include ../schemas/output/job-next.json
/stats:
description: Job stats
get:
description: Get stats about all current jobs
responses:
200:
body:
application/json:
example: !include ../examples/job_stats.json
/reap:
description: Reap stale jobs
post:
responses:
200:
body:
application/json:
example: |
{
"orphaned":3
}
/{JobId}:
description: Perform actions with a specific job
uriParameters:
JobId:
type: string
get:
responses:
200:
body:
application/json:
Colton Leekley-Winslow
committed
example: !include ../examples/output/job.json
schema: !include ../schemas/output/job.json
404:
description: JobId not found
put:
description: |
Update a job. Updates timestamp.
Enforces a valid state machine transition, if any.
Rejects any change to a job that is not currently in 'pending' or 'running' state.
Accepts the same body as /api/jobs/add , except all fields are optional.
body:
application/json:
example: !include ../examples/input/job-update.json
responses:
200:
description: Job was updated. No value is returned
/retry:
description: Retry a job
post:
description: |
Retry a job
The job must have a state of 'failed', and must not have already been retried.
The failed jobs config is copied to a new job.
The ID of the new job is returned
responses:
200:
body:
application/json:
example: |
{"_id":"57a35c118120be0e8d1f3f5f"}
/config.json:
get:
description: Get a job's config
responses:
200:
body:
application/json:
example: !include ../examples/output/job-config.json