Skip to content

Latest snapshot and diff

GET
/orgs/{org}/discovery/latest
curl --request GET \
--url 'https://api.sloose.com/orgs/org_9f3c/discovery/latest?snapshot=1' \
--header 'Authorization: Bearer <token>'

The most recent run and how it differed from the one before it. run is null when discovery has never run for this org — the normal state of a freshly installed org, not an error.

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.

snapshot

Set to 1 to include the full snapshot. It is large — every module and every field — so it is opt-in.

string
Example
1

Set to 1 to include the full snapshot. It is large — every module and every field — so it is opt-in.

The latest run, or nulls when discovery has never run.

Media typeapplication/json
object
run
required
object
id
required
string
status
required
string
moduleCount
required
number
fieldCount
required
number
activeUserCount
required
number | null
errors
required
Array
startedByUserId
required
string | null
createdAt
required
string
diff
required

What changed against the previous run: modules and fields added, removed or altered.

object | null
snapshot

Every module and field as the CRM returned them. Only with ?snapshot=1.

object
key
additional properties
Examplegenerated
{
"run": {
"id": "example",
"status": "example",
"moduleCount": 1,
"fieldCount": 1,
"activeUserCount": 1,
"errors": [
"example"
],
"startedByUserId": "example",
"createdAt": "example"
},
"diff": "example",
"snapshot": {
"additionalProperty": "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"
}