Skip to content

What a retry inherits from the runs before it

GET
/orgs/{org}/imports/{id}/runs/{run}/inherited
curl --request GET \
--url https://api.sloose.com/orgs/org_9f3c/imports/imp_4d1a/runs/run_7c2e/inherited \
--header 'Authorization: Bearer <token>'

The records the run this one retries — and whatever that run itself inherited — already made, or found and changed only by an after-save patch, which this retry does not write again: gathered when the retry was authorised, so what a retry inherits does not change and does not depend on how long the runs before it are kept, or on whether the meter counted it as a retry. Newline-delimited JSON. The first line says what the run stands on — retried, the run it retries, and which of that run’s sources start over, because their file, or how the file is read, has changed since, so their rows are written again: { "retried", "startedOver": [{ "flowId", "label" }] }. A run that stands on none — one authorised without naming a run of this import that has ended, or a dry run — is answered that line alone, with retried null. A run that picked up where another stopped (resume on its authorisation, #1867) stands on none either, and says what it carried: { "retried": null, "startedOver", "resumed", "take": [{ "flowId", "row", "modules" }], "left": [{ "flowId", "row" }] } — the run it picked up, the rows of it it walked again with the modules of each whose create nobody answered (by API name), and the rows left, its own and its chain’s — followed by the lines below for the rows it took alone, its unanswered ones only the creates it sent again where nothing could be looked for first. What a resume left goes down the chain: a run standing on it, or on a run that stands on it, says those rows in its own first line too (left), of the files it still reads as they were. Every line after it is one run record at attempt 0, of one of three kinds. inherited, for a row and module whose record the chain made — or found, and changed by an after-save patch alone (code updated, #2227): { "rowKey", "flowId", "rowNumber", "module", "recordId", "code", "keys", "patched", … } — code says how the chain made it (created or updated), keys the values it was indexed under for links and matches (less the fields its patches may have changed), and patched the fields its after-save patches filled. inherited with "phase": "patch", for an after-save patch that filled a field and put keys on its record: the same shape with target the field, recordId the record and keys the values the patch put on it, which a later row’s link or match may search on. And unanswered, naming no record, for a row and module whose create the chain sent and never heard back about, with nothing in the chain making the record since: it may have been made all the same, so the retry that makes it says the record may exist twice. The first line also says, on every retry, the rows it was handed unfinished — handed: [{ flowId, row }], an empty list where none, at most 1,000 with handedMore: true where there were more: every row with a standing failure (a write refused, failed or never answered, or an after-save patch that was), a record made beside it or not, and the rows the retry before it was handed that its own log never touched, except a row this line owes to a resume and the rows of a file that starts over (a row the limit refused before its write is handed as a failed row here, though the results file and the panel call it not reached; a row the run retried began and left at the day’s allowance, not_reached, is handed on too). It is a list the server can say only where it can: it stops at 1,000 and says handedMore: true, which it also says where the run retried could not say its own list (a retry authorised before this was said, a resume, a run that ended neither complete nor in order), unless no file is kept; a row past the cap is named by no later head, and the page says so in general words instead of naming it. A page that cannot read the chain later names the rows it is given. Any member of the organisation may read it.

org
required

The organisation id the session was issued for. A token for one organisation can never read another.

string
Example
org_9f3c

The organisation id the session was issued for. A token for one organisation can never read another.

id
required

The import id.

string
Example
imp_4d1a

The import id.

run
required

The run id, from POST /entitlements/runs/authorise.

string
Example
run_7c2e

The run id, from POST /entitlements/runs/authorise.

Newline-delimited JSON: what the run stands on and which sources start over, then each record inherited.

Media typeapplication/x-ndjson
string
Examplegenerated
example

No bearer, or one that no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The bearer’s role is too low (code: ROLE_REQUIRED), or it was issued for a different organisation; the organisation has been closed (code: ORG_CLOSED, either kind of bearer); the person is banned (code: BANNED, a session); or it is a session that is signed in but in no organisation (code: NO_ORG): one that never joined one, or whose person was taken out of the one it was in, or left it. Signing in again changes nothing for NO_ORG; choosing or making an organisation does.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No such import or run, or it is not visible to this session.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

A run’s inheritance is in storage this deployment cannot reach (code: NOT_CONFIGURED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com