Whether a run still describes its import
const url = 'https://api.sloose.com/orgs/org_9f3c/imports/imp_4d1a/runs/run_7c2e';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation id the session was issued for. A token for one organisation can never read another.
Example
org_9f3cThe organisation id the session was issued for. A token for one organisation can never read another.
The import id.
Example
imp_4d1aThe import id.
The run id, from POST /entitlements/runs/authorise.
Example
run_7c2eThe run id, from POST /entitlements/runs/authorise.
Responses
Section titled “Responses”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.
object
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.
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.
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.
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.
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.
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.
object
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
object
object
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
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).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
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.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No such import or run, or it is not visible to this session.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
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.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
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.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).