Skip to content

What a run wrote, record by record

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

The run’s log, in the order it was written (seq) — one entry per version of an attempt, normally one: created and updated with the record’s id, refused with the destination’s code and message, unanswered when nothing came back — or when the run’s close found the attempt still unsettled, until a later answer replaces it — failed or skipped at attempt 0 for a module the browser settled (planned for a dry run’s would-be write), made_after_no_answer at attempt 0 where the browser made the record after sending the same create and hearing nothing back, so it may exist twice, would_ask at attempt 0 under the match phase where a dry run found several matching records and the real run would ask which, the count as its code, and lookup at attempt 0 under the lookup phase, the field as its target, where a search lookup came to anything but one record. An attempt can appear twice — a guess (unanswered) and the answer that replaced it, in either order, since the close can guess after an answer was moved — and a reader takes the real answer over unanswered whatever the order, and among real answers the later. The FINAL outcome of a row in a module is its write phase’s highest attempt, never made_after_no_answer, which only says the record may exist twice, nor would_ask, which only says the real run would have asked, nor lookup, which only says what a link came to; a patch’s is its own highest attempt. Paged by limit and cursor — the nextCursor of the page before, which names the last seq read. An ended run’s records are read from where the close moved them, and a cursor does not change with the move: a run’s log only grows, so a page is the same whichever side of the move it is read on. 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.

limit

How many to return, at most 1,000; 500 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.

string
Example
500

How many to return, at most 1,000; 500 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.

cursor

The nextCursor of the page before this one; absent for the first page. Opaque: it names a place in the list’s seq order, and a malformed one is 400 INVALID_CURSOR.

string

The nextCursor of the page before this one; absent for the first page. Opaque: it names a place in the list’s seq order, and a malformed one is 400 INVALID_CURSOR.

The run’s records after the cursor.

Media typeapplication/json
object
records
required
Array<object>
object
seq
required
number
rowKey
required
string
flowId
required
string | null
rowNumber
required
number | null
module
required
string
phase
required
string
Allowed values: write patch match lookup stop
target
required
string
attempt
required
number
recordId
required
string | null
outcome
required
string
Allowed values: created updated refused unanswered inherited failed skipped planned made_after_no_answer would_ask lookup linked not_reached
code
required
string | null
message
required
string | null
at
required
string
nextCursor
required

Pass as cursor for the next page; null when this was the last.

string | null
Example
{
"records": [
{
"phase": "write",
"outcome": "created"
}
]
}

cursor is malformed (code: INVALID_CURSOR).

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 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"
}

The run’s records have moved to storage this deployment cannot reach (code: NOT_CONFIGURED), or are being moved as they are read and have not settled (code: RECORDS_MOVING — ask again in a minute).

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