Skip to content

The organisation’s connectors

GET
/orgs/{org}/connectors
curl --request GET \
--url https://api.sloose.com/orgs/org_9f3c/connectors \
--header 'Authorization: Bearer <token>'

Every connection this organisation holds that the caller may use — the organisation’s, and a person’s own, never another person’s and never a personal one to an API token — with whether each holds a credential the server can use unattended, and how many connections the plan allows. Never returns a credential.

Every member may read it, because whoever starts an import picks the connection it writes to: the work names its connection, and none is the organisation’s default (design §14.8). Adding, renaming and disconnecting stay an administrator’s.

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.

The connectors.

Media typeapplication/json
object
connectors
required
Array<object>
object
id
required
string
kind
required

The kind of system it connects: zoho_crm in this build. A row a later build wrote may name a kind this one does not know, and is returned as stored.

string
roles
required

Source | destination | both

string
label
required

What people call it — the connected system’s own name for the account until an administrator renames it (for zoho_crm, the CRM’s company name).

string
listed
required

Whether a verified user of the CRM may be told this organisation holds it and ask it for access. An administrator turns it off for an organisation that would rather not be listed.

boolean
externalId
required

The system’s own id for the account (for zoho_crm, the Zoho organisation id).

string | null
region
required

The system’s region or data centre, where it has one (for zoho_crm, the Zoho data centre).

string | null
personal
required

A person’s own connection (design §14.6): theirs alone, never an API token’s, managed by nobody else — and never named to the CRM’s users, whatever listed says.

boolean
status
required
string
Allowed values: active revoked
connected
required

Whether it holds a usable credential, so the server can read the system with nobody present.

boolean
health
required

Ok | revoked | error, from the credential’s last use.

string
scopes
required
Array<string>
recordsAccess
required

Whether the grant covers the records themselves, which an import searches and writes. A connection made before connecting asked for them holds sign-in’s scopes alone: it is connected, can be read, and needs reconnecting before an import can run through it.

boolean
queryAccess
required

Whether the system lets the grant ask its query API, by the system’s own answer to a query through it (for zoho_crm, Zoho’s): true once answered, false once refused for want of the permission (the connection then needs reconnecting, since the permission is asked at connect), null until something asked. Discovery asks it once.

boolean | null
layoutsAccess
required

Whether the system lets the grant read a module’s layouts, by its own answer: true once answered, false once refused for want of the permission (ZohoCRM.settings.layouts.READ), null until discovery asked, which it does only of a CRM that has a subform. A subform’s row limit and the columns its layout requires are unknown while it is false; reconnecting gives the permission. It never makes a connection needsReconnecting by itself.

boolean | null
filesAccess
required

Whether the system lets the grant upload a file for a file field, by its own answer: true once answered, false once refused for want of the permission (ZohoCRM.files.CREATE), null until discovery asked, which it does only of a CRM that has a file field. A file field cannot be imported into while it is false; reconnecting gives the permission (an attachment needs only the records permission and is not held by it). It never makes a connection needsReconnecting by itself.

boolean | null
activeUserCount
required
number | null
checkedAt
required
string | null
grantedByUserId
required
string | null
createdAt
required
string
revokedAt
required
string | null
endedByGrantCap
required

Whether a refusal of this connection’s grant is most likely the system’s own cap on grants (#1852). For zoho_crm: Zoho keeps 20 live grants per person per client and silently ends the oldest when one more is made, and the person who granted this one has made that many since. Reconnecting it ends their oldest other connection in turn. False for a connection whose grant is not refused, or was refused for any other reason as far as Sloose can tell.

boolean
fieldsPushed
required

The modules whose field annotations a push from a configuration repository (POST /orgs/{org}/config/bundle, what sloose push sends) has written, each with when it last did; empty when none has. A push writes each of those modules’ annotations whole — and only those modules’ — so an alias added in the app on one of them is taken away by the next push that does not carry it, and one on any other module stays (a push still sets every module’s curation and excluded fields from its modules.json). Written with those annotations, never read from the audit.

Array<object>
object
module
required

The module’s CRM API name.

string
at
required

When a push last wrote its fields.

string
hasFileFields
required

Whether the connection’s system has a file field an import can write (discovery found one, and it is not read-only). What decides whether the page offers “reconnect to import files”: a file field an import cannot write yet is nothing to reconnect for.

boolean
annotate
required

Whether the caller may change this connection’s field annotations, its aliases among them: true when the caller’s role, as this request settles it, is administrator. An API token acts at the lower of its own role and its creator’s (#239), and a read-only staff view writes nothing. False in the backoffice, which changes none.

boolean
allowed
required

Connections the plan allows (connections_max); null = unlimited.

number | null
Example
{
"connectors": [
{
"kind": "zoho_crm",
"status": "active"
}
]
}

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

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