List accounts eligible for a trigger
Changed onLists the connected accounts on a connection, and marks each one as eligible or ineligible for one trigger. Use this endpoint to choose which accounts to subscribe, before calling CreateTriggerSubscription or BatchCreateTriggerSubscriptions. Pass the connection ID and the trigger name in the path. Use query to search account identifiers, and page_size and page_token to page through the results. An ineligible account is returned with a reason and a remedy instead of being left out, so you can see why an account is refused. Each account also carries its health for this trigger: a state, and the single action that resolves it. Returns one page of accounts, the next and previous page tokens, and total_size, which counts the accounts on this connection that match the query.
Request
- Base URLhttps://$SCALEKIT_ENVIRONMENT_URL
- AuthOAuth 2Client credentialsToken URLhttps://$SCALEKIT_ENVIRONMENT_URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
ID of the connection, in this environment. Up to 64 characters.
Name of the trigger, as returned in the name field of ListAvailableTriggers. Up to 128 characters.
Query parameters
Narrows the list to accounts whose identifier contains this text, case-insensitively. Matched against every account on the connection, not only the current page. Up to 100 characters.
How many accounts to return. Defaults to 10; a larger value than 100 is capped at 100 rather than refused.
The next_page_token or prev_page_token from a previous response. Omit it to read the first page. A value that is not a token from a previous response is refused with 400.
Response
One page of the connection's accounts, each with its eligibility and health for the trigger, plus page tokens and the total match count
Example response
{
"accounts": [
{
"eligible": true,
"health": {
"reason": "This account was disconnected.",
"remedy": "Connect the account again to resume triggers."
},
"id": "ca_123456789012345",
"identifier": "user_123",
"reason": "This account was authorized under a different app than the connection now uses.",
"remedy": "Re-authorize this account under your app, then subscribe."
}
],
"next_page_token": "<next_page_token>",
"prev_page_token": "<prev_page_token>",
"total_size": 104
}Changes
- info
endpoint added
- info