Search Triggers
GET {{baseUrl}}/api/v2/triggers/search?query=<string>&json={"conditions":{"all":[{"value":"<Error: Too many levels of nesting to fake this schema>"},{"value":"<Error: Too many levels of nesting to fake this schema>"}],"any":[{"value":"<Error: Too many levels of nesting to fake this schema>"},{"value":"<Error: Too many levels of nesting to fake this schema>"}]},"actions":[{"field":{"value":"<Error: Too many levels of nesting to fake this schema>"},"value":{"value":"<Error: Too many levels of nesting to fake this schema>"}},{"field":{"value":"<Error: Too many levels of nesting to fake this schema>"},"value":{"value":"<Error: Too many levels of nesting to fake this schema>"}}],"title":"<string>","active":"<boolean>","category_id":"<string>","description":"<string>","position":"<integer>","raw_title":"<string>"}&active=<boolean>&sort_by=<string>&sort_order=<string>&include=<string>
Pagination
- Offset pagination only
Allowed For
- Agents
Sideloads
The following sideloads are supported. For more information, see Side-loading.
Name | Will sideload |
---|---|
app_installation | The app installation that requires each trigger, if present |
permissions | The permissions for each trigger |
usage_1h | The number of times each trigger has been used in the past hour |
usage_24h | The number of times each trigger has been used in the past day |
usage_7d | The number of times each trigger has been used in the past week |
usage_30d | The number of times each trigger has been used in the past thirty days |
Filter
Use the filter
query parameter to filter a trigger search by one or more attributes. For example, the following filter
argument filters triggers by the description
attribute:
{
"json": {
"description": "Close a ticket"
}
}
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
query | string | (Required) Query string used to find all triggers with matching title | |
json | string | Trigger attribute filters for the search. See Filter | |
active | string | Filter by active triggers if true or inactive triggers if false | |
sort_by | string | Possible values are "alphabetical", "created_at", "updated_at", "usage_1h", "usage_24h", or "usage_7d". Defaults to "position" | |
sort_order | string | One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others | |
include | string | A sideload to include in the response. See Sideloads |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"count":2,"next_page":null,"previous_page":null,"triggers":[{"actions":[],"active":true,"conditions":{"all":[{"field":"status","operator":"less_than","value":"solved"},{"field":"assignee_id","operator":"is","value":"296220096"}],"any":[{"field":"status","operator":"less_than","value":"solved"}]},"created_at":"2012-09-25T22:50:26Z","description":"Close and save a ticket","id":25,"position":9,"raw_title":"Close and Save","title":"Close and Save","updated_at":"2012-09-25T22:50:26Z"},{"actions":[],"active":true,"conditions":{},"created_at":"2012-09-25T22:50:26Z","id":28,"position":9,"raw_title":"{{dc.close_and_redirect}}","title":"Close and redirect to topics","updated_at":"2012-09-25T22:50:26Z"}]}