Overview
A sync is how Lumos pulls an integration’s current data (accounts, groups, and entitlements) so what you see in Lumos matches what’s in the app. Lumos already syncs every connected integration on a regular schedule, and connecting or reconnecting an integration triggers a sync automatically. The sync endpoint covers the moments in between: when you’ve just made changes in the app and want them reflected in Lumos now, rather than at the next scheduled sync. Typical triggers:- Right after automation finishes a change in the app, such as an offboarding wave, a role migration, or a department reorg.
- Right after
terraform applyconnects an integration, from the same CI pipeline. - Before kicking off an Access Review, so reviewers see current data.
- On your own schedule, if you want a specific integration refreshed more often.
Before you start
You need:- An API token. Create one in the Lumos UI under Settings → API Tokens. The token is shown once, so copy it somewhere safe. Examples below read it from a
LUMOS_API_TOKENenvironment variable. Authentication covers tokens in detail. - Permission to manage integrations. A token acts as the user who created it, so that user must be an admin with permission to manage integrations. Without it, calls return
403. - A connected integration. It can be connected in the Lumos UI, via the API, or via Terraform.
- The base URL
https://api.lumos.com. All paths below are relative to it.
Concept-to-endpoint map
Core workflow
1. Find the integration’s id
Syncs are triggered by the integration’sid (a UUID). List your apps and pick the one you want. Add disconnected=false to narrow the list to connected ones, and search to match a name:
next_page_token is null, as Pagination describes.
If you connected the integration programmatically you already have this id: it’s the id returned by the connect call, and the id attribute of the lumos_app Terraform resource (terraform state show lumos_app.okta).
2. Trigger the sync
Call the sync endpoint with thesync_type you want. Today the only supported value is full-sync, a full re-pull of the integration’s accounts, groups, and entitlements:
"skip_first_sync_review": true, as The first sync describes.
A 202 Accepted confirms the sync was launched, and returns an operation:
sync_type is required even though there’s one value today. New sync kinds will be added as additional values, so your request shape won’t change.
3. Follow the sync
The sync runs asynchronously: the202 means it was launched, not that it finished. How long it takes depends on the integration and the amount of data. Poll Get Operation with the operation’s id until done is true. Then result is set if the sync succeeded, and error, with code set to app_sync.failed, if it failed. Long-running operations covers polling, and the app’s sync_status field reports the same state.
Only one sync runs at a time per integration. If a sync is already in progress, including a scheduled one Lumos started, the call returns 409 with code set to app.sync_in_progress:
409 usually means the refresh you wanted is underway anyway.
Handling errors
Every error uses the same envelope. Branch oncode, not on detail. Errors lists every status and code.
Next steps
- Connect and manage integrations programmatically with the Integrations API or Terraform.
- See the full API reference at Lumos API v1.