Skip to content

Report the rows a run failed or passed over

POST
/orgs/{org}/imports/{id}/runs/{run}/outcomes
curl --request POST \
--url https://api.sloose.com/orgs/org_9f3c/imports/imp_4d1a/runs/run_7c2e/outcomes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "outcomes": [ { "rowKey": "example", "module": "example", "outcome": "failed", "code": "example", "message": "example", "recordId": "example", "phase": "write", "target": "example" } ] }'

Every module a row settled in the browser as failed or passed over — a formula that threw, a payload it could not build, an ambiguous match, a write that failed (failed), or a row it skipped, filtered, guarded or left alone (skipped), or — in a dry run — a write it would have made (planned, with CREATE or UPDATE as its code) — and every after-save patch that did not fill its field (phase: patch, the field as target) is reported here, up to five hundred at a time, and recorded as attempt 0 beside the attempts the destination answered, so History, the results file and a retry see every failed row after a reload (design §5.4). So is the browser’s word that it made a row’s record after sending the same create and hearing nothing back (made_after_no_answer), which may have made the record too: a flag beside the record’s own answer and never an answer, so the results file and a reopened import still say the record may exist twice when the run’s records do not say the send went unanswered. And so is a dry run’s word that the real run would stop and ask which of several matching records to use (would_ask, with the count as its code, said of the record’s match rather than its write), so a dry run reopened says so as the page that ran it did. A failure is reported even when its write went out, because only the server knows whether it arrived: when it did, the destination’s answer is a later attempt and outranks this one — a row’s outcome is its highest attempt — and when it did not, this is the only record there is. Reporting the same row twice records it once. Only the session or token that authorised the run, while it holds its import.

org
required

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

string
Example
org_9f3c

The org id the session was issued for. A token for one org 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.

Media typeapplication/json
object
outcomes
required
Array<object>
>= 1 items <= 500 items
object
rowKey
required
string
>= 1 characters <= 200 characters
module
required
string
>= 1 characters <= 200 characters
outcome
required

failed or skipped, what the browser settled; planned, a dry run’s would-be write; made_after_no_answer, the browser’s word that it made this row’s record in the module after sending the same create and hearing nothing back — so it may exist twice; or would_ask (on the match phase), a dry run’s word that several records matched and the real run would stop and ask which to use, with the count its search found as its code (2, or 10+ when it found as many as it asks for); or lookup (on the lookup phase, the lookup field as target), the browser’s word that a search lookup came to anything but one record — none matched the value in message, blank there was nothing to search by, unworkable its formula could not be worked out, or how many matched it (2, 10+) when the first was linked. Each word is kept beside the record’s own outcome and never stands for it: they are what a reopen says when nothing else in the run’s records does.

string
Allowed values: failed skipped planned made_after_no_answer would_ask lookup
code
string | null
<= 200 characters
message
string | null
<= 2000 characters
recordId

On a skipped module passed over because its record already exists (EXISTS, LEFT for a match left as it is, or GUARDED for one whose update guard held it back): the record it found and linked to, which the results file names in the module’s record column (#1460). Ignored on any other outcome, code or phase: a module passed over for any other reason found no record.

string | null
<= 200 characters
phase

Which part of the record this is about: its write (the default), a patch of one field after the save, named by target, its match — which record the write goes to — the one part would_ask is said of, or a lookup of one field, named by target, the one part lookup is said of.

string
Allowed values: write patch match lookup
target

The field a patch fills or a lookup looks up; required with either, ignored otherwise.

string
<= 200 characters

Recorded.

Media typeapplication/json
object
recorded
required

How many were new: a row already reported is not recorded twice.

number
Examplegenerated
{
"recorded": 1
}

No outcomes, more than five hundred, one that is not failed, skipped, planned, made_after_no_answer, would_ask or lookup, a patch or a lookup that names no field (code: TARGET_REQUIRED), a planned outcome anywhere but a dry run’s write with CREATE or UPDATE as its code (code: NOT_A_PLAN), made_after_no_answer anywhere but the write of a run that writes (code: NOTHING_MADE), or would_ask anywhere but a dry run’s match, or without a count of two or more as its code, or anything but would_ask on a match (code: NOT_A_QUESTION), or lookup anywhere but on a lookup, or with a code that says nothing, or none or a count without the value searched for as its message, or what became of it saying ask in a run that writes or chosen in a dry run, or anything but lookup on a lookup (code: NOT_A_LOOKUP).

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 is expired, revoked or no longer resolves to a member.

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

Not the session or token that authorised this run (code: NOT_YOUR_RUN), or the role is too low.

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 no longer holds its import (code: LEASE_LOST).

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

Report a problem with this page