Skip to content

List imports

GET
/orgs/{org}/imports
curl --request GET \
--url 'https://api.sloose.com/orgs/org_9f3c/imports?mine=true&status=open&limit=100' \
--header 'Authorization: Bearer <token>'

The org’s imports, most recently active first, a page at a time. mine keeps the ones the caller started (a token’s count as its creator’s). Every member sees every import; what each may do to one is a matter of §7’s roles, asked when they try.

The order is each import’s latest activity — the later of when it was last changed and when its last run ended — so it MOVES while somebody pages through it: an import changed, or whose run ends, between two pages moves ahead of the cursor — the next page does not show it, and it is at the top of the list read again. An import is never shown twice.

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.

mine

true for only the caller’s own.

string
Allowed values: true false
Example
true

true for only the caller’s own.

status
string
Allowed values: open running attention done
template

Only imports from this template.

string

Only imports from this template.

connector

Only imports that write through this connection — the Connections pages’ count of the imports through one. An id that is none of the org’s connections finds none: it is a filter, not a connection the request uses, so it is never refused.

string

Only imports that write through this connection — the Connections pages’ count of the imports through one. An id that is none of the org’s connections finds none: it is a filter, not a connection the request uses, so it is never refused.

q

Only imports whose name contains this text, ignoring case (ASCII letters; any other character matches as typed). Blank asks for every import. Only its first 200 characters are searched for: a longer text is cut there, never refused. The next page is asked for with the same text.

string

Only imports whose name contains this text, ignoring case (ASCII letters; any other character matches as typed). Blank asks for every import. Only its first 200 characters are searched for: a longer text is cut there, never refused. The next page is asked for with the same text.

limit

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

string
Example
100

How many to return, at most 200; 100 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 (activityAt, id) 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 (activityAt, id) order, and a malformed one is 400 INVALID_CURSOR.

A page of the imports.

Media typeapplication/json
object
imports
required
Array<object>
object
id
required
string
orgId
required
string
connectorId
required

The connection Target names; null until one is chosen.

string | null
templateId
required

The template this import was started from or saved as.

string | null
templateVersion
required

The template version it copied: “the template has moved on” compares this.

integer | null
name
required
string
createdByUserId
required

Who started it — the person, or the person a token acts as. Null only for an import a schedule started, which is nobody’s own.

string | null
tokenId
required

The token held, when one was.

string | null
createdByScheduleId
required
string | null
status
required

Where it stands. An import being deleted is not returned at all: it reads as gone the moment its delete is accepted.

string
Allowed values: open running attention done
currentStep
required

Whichever step the wizard of the day left it on, as that wizard names it.

string | null
currentStage
required
string | null
completedSteps
required
Array<string>
enabledModules
required
Array<string>
version
required

The write precondition: every change names the version it was made against, and a stale one is refused 409 IMPORT_CHANGED.

integer
updatedByUserId
required
string | null
updatedByTokenId
required
string | null
updatedByScheduleId
required
string | null
runningRunId
required

The run that holds the import; every other write is refused while one does.

string | null
lastRunAt
required
string | null
createdAt
required
string
updatedAt
required
string
openBy
required

Who has it open right now, one entry per person however many tabs, in the order they arrived — from the import’s room (GET …/live).

Array<object>
object
userId
required
string
name
required

Their name, or their address when they have cleared it.

string
nextCursor
required

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

string | null
Example
{
"imports": [
{
"status": "open"
}
]
}

The query did not match the schema (issues carries the Zod issue list), or 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 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"
}

The bearer’s role is too low, or it was issued for a different org.

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