202 Accepted right away, with an operation that describes the work. You poll the operation until
the work finishes. Every operation type has the same shape, so one polling loop handles all of
them.
Four endpoints work this way:
The operation object
The call that starts the work wraps the operation in anoperation key:
While
done is false, neither result nor error is set. When done is true, exactly one of
them is set. Check done first. Then check which of the two fields is present.
An operation’s error isn’t the error envelope that an HTTP failure
returns. It has a code to branch on, a human-readable message, and an errors list for
item-level failures. No operation type itemizes its failures today, so errors is empty.
Polling
Poll Get Operation with the operation’sid. It
returns the operation itself, without the operation wrapper:
What each operation type returns
App sync
Started by Trigger App Sync.metadata carries type,
app_id, and the sync_type that you requested.
- A successful sync sets
resultto{ "app_id": "…", "sync_status": "success" }. - A failed sync sets
error.codetoapp_sync.failed.
sync_status field.
Account upload
Started by Upload Accounts.metadata carries type
and app_id. Each upload gets its own operation, so the ID tracks that one upload.
- A successful upload sets
resultto{ "app_id": "…", "state": "SUCCESS" }. - A failed upload sets
error.codetoaccount_upload.failed. - An upload that’s cancelled before it finishes sets
error.codetoaccount_upload.cancelled.
App review sync
Started by Sync App Review.metadata carries
type and app_review_id.
- A successful sync sets
resultto{ "app_review_id": "…", "status": "…" }, wherestatusis the app review’s current status, such asassigning-reviewers. - A failed sync sets
error.codetoaccess_review_app_sync.failed.
App delete
Started by Delete App for an app connected through an integration.metadata carries type and app_id.
- A successful delete sets
resultto{ "app_id": "…" }, and the app no longer exists. error.codeapp_delete.record_retainedmeans other Lumos data still references the app, so it stays, disconnected.error.codeapp_delete.failedmeans removing the app’s accounts failed. The app is already disconnected, so retry the delete.
Who can poll
You can poll an operation if you’re allowed to start that type of work on its resource, or if you can read that resource. Anyone else in your organization gets403.
Errors when polling
An unknown or malformed operation ID returns404, as does an operation whose resource has since
been deleted. An app delete operation is the exception: you can still poll it after the app is
gone.