Skip to main content

Listing Triggers

At any time, you can list existing Triggers in a Realm and fetch their details and definitions.

Listing and querying Triggers using Data Orchestrator Dashboard​

After logging in, navigate to the Triggers page using the menu on the left. The list of Triggers installed in the Realm will be shown in the page. Clicking on a Trigger will open the Trigger editor in view-only mode, showing its definition on the right panel.

Listing and querying Triggers using astartectl​

To list all existing Triggers in a Realm:

$ astartectl realm-management triggers list
[my_trigger other_trigger my_connection_trigger my_data_trigger]

To get a Trigger definition:

$ astartectl realm-management triggers show my_connection_trigger
{
"name": "my_connection_trigger",
"action": {
"http_url": "<url>",
"http_method": "<method>"
},
"simple_triggers": [
{
"type": "device_trigger",
"device_id": "*",
"on": "device_connected"
}
]
}

Listing and querying Triggers using Realm Management API​

To list all existing Triggers in a Realm:

GET api.<astarte base URL>/realmmanagement/v1/<realm name>/triggers

{
"data": [
"my_trigger",
"other_trigger",
"my_connection_trigger",
"my_data_trigger"
]
}

To get a Trigger definition:

GET api.<astarte base URL>/realmmanagement/v1/<realm name>/triggers/my_connection_trigger

{
"data": {
"name": "my_connection_trigger",
"action": {
"http_url": "<url>",
"http_method": "<method>"
},
"simple_triggers": [
{
"type": "device_trigger",
"device_id": "*",
"on": "device_connected"
}
]
}
}