:selector in the API route) and query parameters.
By ID
If you have an id of an element you need, you can use it to address the element:GET /actions/651488f5eba1bdf86a702ca3- get action with id 651488f5eba1bdf86a702ca3.POST /flows/63b30e09e9a70700c7dc5e82/run- run flow with id 63b30e09e9a70700c7dc5e82.
By Key
Most workspace elements have keys act as human-readable identifiers of those elements. In many cases, you can address elements by key:GET /actions/create-task- get action with key “create-task”.POST /flows/send-update/run- run a flow with key “send-update”.
- There is only one element with this key in the workspace.
- There is a universal element with this key and it can be used for the current request.
GET /actions/create-taskwill not work when you have multiple integration-level actions with keycreate-taskand no universal one.POST /flows/send-update/runwill not work without additional clarifying parameters if the current tenant has multiple connections (which makes it impossible to determine which of them to use to run the flow).
By Integration Key + Element Key
It is the best way to address integration-specific elements. For example:GET /actions/github.create-taskwill return action with keycreate-taskfor integration with keygithub.POST /flows/slack.send-update/runwill run flow with keysend-updatefor integrationslack(using default connection to Slack for the current user).
create-task and Github connector provides github-specific action create-task, by addressing action as github.create-task you are guaranteed to get the github-specific version of the action (and not an implementation of universal create-task for github).
Parameters
Additionally to selector in the path, there are clarifying parameters you can pass to get the exact element you need when addressing it by key:connectionId- will return connection-specific element for this id (and automatically create it from integration-specific element if it doesn’t exist yet).integrationKeyorintegrationId- will return integration-specific implementation of a given universal element if it exist (it will not be auto-created). For example,/flows/send-update?integrationKey=slackwill address an implementation of universal flowsend-updateforslackintegration.layer(universal|integration|connection) - will return element of the specific layer (see Overview for details). For example,/actions/github.create-task?layer=connectionwill return connection-layer task based on the integration-layer task. The connection-layer task will be returned for the defaultgithubconnection for the current tenant (if it can be determined).