What a run wrote, record by record
const url = 'https://api.sloose.com/orgs/org_9f3c/imports/imp_4d1a/runs/run_7c2e/records?limit=500';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/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 org may read it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The org id the session was issued for. A token for one org can never read another.
Example
org_9f3cThe org id the session was issued for. A token for one org 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.
Query Parameters
Section titled “Query Parameters”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.
Example
500How 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.
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 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.
Responses
Section titled “Responses”The run’s records after the cursor.
object
object
Pass as cursor for the next page; null when this was the last.
Example
{ "records": [ { "phase": "write", "outcome": "created" } ]}cursor is malformed (code: INVALID_CURSOR).
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 bearer, or one that is expired, revoked or no longer resolves to a member.
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, or it was issued for a different org.
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"}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).
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"}