API docs

Reference · Jobs

Stop a job

POST /api/v1/jobs/{id}/cancel

Stops a running job. Results already delivered stay (and stay charged); the credits held for the rest go back at once.

Credits: Free.

Parameters

NameTypeRequiredWhat it is
idintegeryesThe id.

Example request

Shell
curl -X POST "https://moleman.io/api/v1/jobs/123/cancel" \
  -H "Authorization: Bearer $MOLEMAN_API_KEY"

Errors

StatusCodeWhen
401missing_api_keyThe request has no API key.
401invalid_api_keyThe API key is not one of ours (a typo, a cut-off copy, or a key from another account that was deleted).
401revoked_api_keyThe API key was revoked on the API page. Revoking takes effect at once.
429rate_limitedMore than 120 requests in one minute with this key.
500server_errorSomething broke on our side. Nothing was charged for it.
400invalid_requestA parameter is missing, has the wrong type or is out of range. details lists every problem with its path.
400invalid_jsonThe body is not valid JSON.
409idempotency_in_progressA request with the same Idempotency-Key is still running.
422idempotency_key_reusedThe Idempotency-Key was already used in the last 24 hours with a different request.
404not_foundThe job or list does not exist, belongs to another account, or was deleted.
403wrong_key_modeA test key asked for something made with a live key, or the other way round. Test and live data never mix.