Latest snapshot and diff
const url = 'https://api.sloose.com/orgs/org_9f3c/discovery/latest?snapshot=1';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/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.
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.
Query Parameters
Section titled “Query Parameters”Set to 1 to include the full snapshot. It is large — every module and every field — so it is opt-in.
Example
1Set to 1 to include the full snapshot. It is large — every module and every field — so it is opt-in.
Responses
Section titled “Responses”The latest run, or nulls when discovery has never run.
object
object
What changed against the previous run: modules and fields added, removed or altered.
Every module and field as the CRM returned them. Only with ?snapshot=1.
object
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.
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"}