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

See Using Offset Pagination.

Allowed For

  • Agents

Sideloads

The following sideloads are supported. For more information, see Side-loading.

NameWill sideload
app_installationThe app installation that requires each trigger, if present
permissionsThe permissions for each trigger
usage_1hThe number of times each trigger has been used in the past hour
usage_24hThe number of times each trigger has been used in the past day
usage_7dThe number of times each trigger has been used in the past week
usage_30dThe 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

KeyDatatypeRequiredDescription
querystring(Required) Query string used to find all triggers with matching title
jsonstringTrigger attribute filters for the search. See Filter
activestringFilter by active triggers if true or inactive triggers if false
sort_bystringPossible values are "alphabetical", "created_at", "updated_at", "usage_1h", "usage_24h", or "usage_7d". Defaults to "position"
sort_orderstringOne of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
includestringA sideload to include in the response. See Sideloads

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;count&quot;:2,&quot;next_page&quot;:null,&quot;previous_page&quot;:null,&quot;triggers&quot;:[{&quot;actions&quot;:[],&quot;active&quot;:true,&quot;conditions&quot;:{&quot;all&quot;:[{&quot;field&quot;:&quot;status&quot;,&quot;operator&quot;:&quot;less_than&quot;,&quot;value&quot;:&quot;solved&quot;},{&quot;field&quot;:&quot;assignee_id&quot;,&quot;operator&quot;:&quot;is&quot;,&quot;value&quot;:&quot;296220096&quot;}],&quot;any&quot;:[{&quot;field&quot;:&quot;status&quot;,&quot;operator&quot;:&quot;less_than&quot;,&quot;value&quot;:&quot;solved&quot;}]},&quot;created_at&quot;:&quot;2012-09-25T22:50:26Z&quot;,&quot;description&quot;:&quot;Close and save a ticket&quot;,&quot;id&quot;:25,&quot;position&quot;:9,&quot;raw_title&quot;:&quot;Close and Save&quot;,&quot;title&quot;:&quot;Close and Save&quot;,&quot;updated_at&quot;:&quot;2012-09-25T22:50:26Z&quot;},{&quot;actions&quot;:[],&quot;active&quot;:true,&quot;conditions&quot;:{},&quot;created_at&quot;:&quot;2012-09-25T22:50:26Z&quot;,&quot;id&quot;:28,&quot;position&quot;:9,&quot;raw_title&quot;:&quot;{{dc.close_and_redirect}}&quot;,&quot;title&quot;:&quot;Close and redirect to topics&quot;,&quot;updated_at&quot;:&quot;2012-09-25T22:50:26Z&quot;}]}