AlmondTill/G3N API

exportJobDownload

query · in the family Reading your records

What it does

Get a short-lived link to download the file a finished export wrote — its name, size, row count and format come with it.

Download ONE finished background export's file: a short-lived presigned GET (alive 300 s — expiresAt) on the composed file, the name to save it as (fileName — <family>-<YYYYMMDD-HHMMSS>-<sysId>.<csv|jsonl>), and the file's facts off the record (bytes · rowCount · format · partial — true when the run halted before the end and the file holds what was written). The file lives 7 days from the finish; afterwards NOT_FOUND worded expired (the record stays readable). Yours alone: only the job's owner may download — anyone else refuses AUTHZ/FORBIDDEN — and your own right to list the plan's last family is re-checked (refused AUTHZ/FORBIDDEN naming it); a job that is not done (cancelled · expired · failed) refuses CONFLICT/REF_STATE naming its status; a job outside your tenant, or none at all, is NOT_FOUND. Requires authentication (user sessions).

Before you call

A signed-in user’s session — the call refuses an API key (AUTHZ/FORBIDDEN).

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

Read-only: only the person who started the export can download it, and only while they may still list that kind of record. The link lives five minutes; the file is kept for seven days after the export finishes, then it is gone and the download says so.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.

Returns

ExportJobDownload ExportJobDownload! — One finished export's download: the presigned GET (url, alive until expiresAt — 300 s), the name to save it as, and the file's facts off the record — bytes · rowCount · format · partial (the run halted before the end; the file holds what was written).

Example request

graphql
query ExampleExportJobDownload($id: ID!) {
  exportJobDownload(id: $id) {
    url
    expiresAt
    fileName
    bytes
    rowCount
    format
    partial
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-37386ae00000"
}

Example response

json
{
  "data": {
    "exportJobDownload": {
      "url": "https://example.com/hook",
      "expiresAt": "2028-01-31T00:00:00.000Z",
      "fileName": "Blue jeans",
      "bytes": 1,
      "rowCount": 1,
      "format": "csv",
      "partial": true
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer