List event triggers
import requests
url = "https://api.datagrid.com/v1/agents/{agent_id}/event-triggers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/agents/{agent_id}/event-triggers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/agents/{agent_id}/event-triggers \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"object": "event_trigger",
"id": "<string>",
"enabled": true,
"trigger_source": "procore",
"trigger_event": "<string>",
"name": "<string>",
"description": "<string>",
"run_conditions": "<string>",
"response_thread": "create_new_thread_each_time",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Event Triggers
List event triggers
List the App Event automations (event triggers) configured for the specified agent. An event trigger fires the agent in response to an external provider event (e.g. a Procore webhook such as Tasks:create). An agent has at most one event trigger, so the returned list contains zero or one item and has_more is always false.
GET
/
agents
/
{agent_id}
/
event-triggers
List event triggers
import requests
url = "https://api.datagrid.com/v1/agents/{agent_id}/event-triggers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/agents/{agent_id}/event-triggers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/agents/{agent_id}/event-triggers \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"object": "event_trigger",
"id": "<string>",
"enabled": true,
"trigger_source": "procore",
"trigger_event": "<string>",
"name": "<string>",
"description": "<string>",
"run_conditions": "<string>",
"response_thread": "create_new_thread_each_time",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Response
List of event triggers for the agent