Skip to content

Download an output

GET /v1/jobs/{id}/outputs/{n}

Download an output: a redirect to its URL.

For a client that adds your key to every request, as automation platforms do: this route takes the key, and answers 302 to the output’s download URL, which needs none (HTTP clients drop Authorization when a redirect leads to another host). n is the output’s place in outputs, from 0.

API key with the read scope.

Request

Terminal window
curl "https://api.formatjet.com/v1/jobs/job_01JBXA3Q6M2T8V4W9Y5Z7B1C3D/outputs/{n}" \
-H "Authorization: Bearer $FORMATJET_API_KEY"

Path parameters

FieldTypeDescription
id requiredstring
n requiredstringThe output’s place in outputs, from 0

Responses

302

To the file

Errors

Problem documents (application/problem+json); see Errors.

StatusCodeWhen
401unauthorizedNo API key, or one that’s unknown or revoked.
403forbiddenThe key lacks the read scope, or the plan has no API.
404not_foundNo such job of this key’s mode, no output at that place yet, or the file is gone.
429rate_limitedMore requests than the plan allows in 10 seconds: wait Retry-After seconds.