Skip to content

Whether a run still describes its import

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

Which of the run’s flows the import still holds as the run read them: the same source, bound to the same flow, the same stored file, read under the same options. A run’s records name rows as (flow, row number), and a row’s number is its place in its file as read — so a replaced file, or one read with another header row or sheet, puts different rows at the same numbers, and the run’s results for that flow no longer describe the import’s rows. unchanged and changed list flow ids (null for a run of one unnamed flow). The cleaning is not compared: exclusions and cell edits do not renumber a file. 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.

The run’s flows, by whether the import still holds each one’s file as the run read it, and what it set out to walk.

Media typeapplication/json
object
id
required
string
unchanged
required
Array<string | null>
changed
required
Array<string | null>
importVersion
required

The import’s version this was answered against: a change to the import after it — a file replaced, another reading — is one this answer does not know about.

integer
recipeUnchanged
required

Whether the import still holds the recipe the run was authorised on (its mappings, matching, filters, value maps, the modules written and the run’s answers, as the run snapshotted them at the claim — compared as a person would, so the dry-run switch, the schema version, a file’s description, its recorded columns and its recorded reshape are not changes; the order of the flows is): false once any of it has changed since, which a result read back from this run does not describe. Null for a run that kept no recipe. The files are unchanged and changed above; this is the recipe.

boolean | null
settled
required

Whether everything the run sent has been answered, or written down as unanswered (#1867). False while it runs, and for a couple of minutes after it ends while the server waits for Zoho’s last answers before writing down what never came: until then a write still out reads as not reached, the row a resume would pick up from can still move, and what a retry inherits is not yet whole. False, too, while any run it follows — the run it retried or picked up, and each before that — is not settled, and for a chain of more than 1,000 runs, which is not asked whole (#1917). Resume and Retry both wait for it: either is refused 409 RUN_SETTLING until then. False, too, for two minutes after a run its own runner closed (complete, cancelled or error), while that runner may still report how its rows ended (#2030): a page showing a run it read back from the server (a reload, a colleague’s tab) asks again and reads the run whole once they are in; the tab that ran it does not wait. That wait is the page’s own; authorisation does not refuse on it. False for good when recordsLost.

boolean
writesSettled
required

Whether a resume or a retry of the run would be let past its settling now (#2081): settled without the two minutes in which the run’s own runner may still report how its rows ended. True once every write of it, and of each run it follows, is answered or written down — what the authorisation of a resume or a retry asks before it answers 409 RUN_SETTLING. For the page that RAN the run: it holds every outcome its own run reported, so it waits on this and not on settled, which would hold Resume for two minutes after every stop. False for good when recordsLost.

boolean
recordsLost
required

The server gave up writing down some of what this run, or a run it follows, sent and what came back (#1890 review, #1917): the store its records go to refused them for a week, and what it still held was let go. Those records can never say whole which rows were made, so the run is never settled, and a resume or a retry of it is refused (409 RUN_RECORDS_LOST): run the import again instead.

boolean
finishes
required

Whether each file the run read finishes a row with its record (#2283), as the recipe the run ran said when it was authorised: a row of it makes exactly one call of its own to the destination (a module’s write, a key-only create, or an after-save patch, one per field, on any module it runs; searches and look-ups change nothing). Null for a run authorised without it, or kept before it was: its last rows are then marked as they always were.

Array<object> | null
object
flowId
required
string | null
finishes
required
boolean
plan
required

What the run set out to walk, as the page that ran it said at its authorisation (plan): its files in the order it met them, each with the rows it ran (endRow null: to the file’s end; an endRow before the startRow is an empty range: that file ran no row), and where it began when it picked up part-way (from). A run picking up where it stopped walks this rather than the ranges on screen now, which a reopened import resets. Null for a run kept before plans were, or one whose page sent none: unknown, never guessed.

object
files
required
Array<object>
object
flowId
required
string | null
range
required
object
startRow
required
integer
endRow
required
integer | null
from
required

Where a run that picked up part-way began (#1252): the file, by its flow, and the row. Null for a run that began at its start, and for one kept before this was.

object
flowId
required
string | null
row
required
integer
Examplegenerated
{
"id": "example",
"unchanged": [
"example"
],
"changed": [
"example"
],
"importVersion": 1,
"recipeUnchanged": true,
"settled": true,
"writesSettled": true,
"recordsLost": true,
"finishes": [
{
"flowId": "example",
"finishes": true
}
],
"plan": {
"files": [
{
"flowId": "example",
"range": {
"startRow": 1,
"endRow": 1
}
}
],
"from": {
"flowId": "example",
"row": 1
}
}
}

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 reading’s options were written by a newer build of Sloose than this one (FROM_FUTURE), and cannot be compared by this one.

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