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
curl "https://api.formatjet.com/v1/jobs/job_01JBXA3Q6M2T8V4W9Y5Z7B1C3D/outputs/{n}" \ -H "Authorization: Bearer $FORMATJET_API_KEY"Path parameters
| Field | Type | Description |
|---|---|---|
id required | string | |
n required | string | The output’s place in outputs, from 0 |
Responses
302
To the file
Errors
Problem documents (application/problem+json); see Errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No API key, or one that’s unknown or revoked. |
| 403 | forbidden | The key lacks the read scope, or the plan has no API. |
| 404 | not_found | No such job of this key’s mode, no output at that place yet, or the file is gone. |
| 429 | rate_limited | More requests than the plan allows in 10 seconds: wait Retry-After seconds. |