For AI agents: this page is also available as Markdown at https://docs.refabric.com/api-reference/platform/jobs/read-a-jobs-result.md, and the index of every page is https://docs.refabric.com/llms.txt.

Platform API › Jobs

Read a job's result

What a succeeded job delivered: its files, one page at a time, and a summary.

GEThttps://api.refabric.com/v1/jobs/{job_id}/result
import os
import requests

url = "https://api.refabric.com/v1/jobs/{job_id}/result"

headers = {"Authorization": f"Key {os.environ['REFABRIC_API_KEY']}"}

response = requests.get(url, headers=headers)

print(response.json())
{
  "job_id": "9b2f4c1d0e8a",
  "files": [],
  "has_more": false,
  "next_cursor": null,
  "summary": {}
}

Authentication. A key with jobs:read: a job and its files are your account's.

Key features

  • Pages of 100 files by default, 200 at most; in the order the job delivered them.

Common use cases

  • Download what a job made once it has succeeded.

Conflicts. Until the job has succeeded it answers 409: result_not_ready while it runs, job_failed when it failed, cancelled when it was cancelled.

See also

  • GET /v1/jobs/{job_id}
  • GET /v1/files/{ref}

Authorization

Authorization: Key $REFABRIC_API_KEYScope: jobs:read

Parameters

Path parameters

  • stringrequired

Query parameters

  • integeroptionalDefault: 100

    Items per page: default 100, at most 200.

    1 to 200

  • stringoptionalnullable

    The previous page's next_cursor, copied back as it came, for the next page. Never build one.

Header parameters

  • stringoptional

    The contract version you wrote against (a date). Absent: the current version.

    format: date

  • stringoptional

    Your own id for this request; we answer it back under X-Client-Request-ID.

    max length 128

Response

200 — Done: the answer is in the body.

  • stringrequired

    The job.

    Example: 9b2f4c1d0e8a

  • array<object>required

    The files, in the order the job delivered them.

  • booleanrequired

    More files are on the next page.

    Example: false

  • stringoptionalnullable

    Present when has_more: send it as cursor to the result read for the rest.

  • objectoptionalnullable

    Present when the task has words to count.

  • 400 — The request cannot be read as it was sent (a header, the URL or the body's form).
  • 401 — No valid API key was sent.
  • 403 — Your key or your plan does not allow this.
  • 404 — Nothing has this address.
  • 409 — The request conflicts with the current state of what it names.
  • 422 — A field is missing or has a value this operation cannot use.
  • 429 — Too many requests: wait for the number of seconds in the Retry-After header.
  • 500 — Something went wrong on our side; retry, and quote the request id if it keeps happening.