Skip to main content
POST
/
v1
/
triggers
/
list
List Triggers
curl --request POST \
  --url https://api.mixpeek.com/v1/triggers/list \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resource_id": "<string>",
  "offset": 0,
  "limit": 50,
  "sort_by": "created_at",
  "direction": "desc"
}
'
import requests

url = "https://api.mixpeek.com/v1/triggers/list"

payload = {
    "resource_id": "<string>",
    "offset": 0,
    "limit": 50,
    "sort_by": "created_at",
    "direction": "desc"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    resource_id: '<string>',
    offset: 0,
    limit: 50,
    sort_by: 'created_at',
    direction: 'desc'
  })
};

fetch('https://api.mixpeek.com/v1/triggers/list', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.mixpeek.com/v1/triggers/list",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'resource_id' => '<string>',
    'offset' => 0,
    'limit' => 50,
    'sort_by' => 'created_at',
    'direction' => 'desc'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.mixpeek.com/v1/triggers/list"

	payload := strings.NewReader("{\n  \"resource_id\": \"<string>\",\n  \"offset\": 0,\n  \"limit\": 50,\n  \"sort_by\": \"created_at\",\n  \"direction\": \"desc\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.mixpeek.com/v1/triggers/list")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"resource_id\": \"<string>\",\n  \"offset\": 0,\n  \"limit\": 50,\n  \"sort_by\": \"created_at\",\n  \"direction\": \"desc\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.mixpeek.com/v1/triggers/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"resource_id\": \"<string>\",\n  \"offset\": 0,\n  \"limit\": 50,\n  \"sort_by\": \"created_at\",\n  \"direction\": \"desc\"\n}"

response = http.request(request)
puts response.read_body
{
  "results": [
    {
      "namespace_id": "<string>",
      "internal_id": "<string>",
      "action_config": {},
      "schedule_config": {},
      "trigger_id": "<string>",
      "status": "active",
      "last_triggered_at": "2023-11-07T05:31:56Z",
      "last_execution_task_id": "<string>",
      "next_scheduled_at": "2023-11-07T05:31:56Z",
      "execution_count": 0,
      "consecutive_failures": 0,
      "last_execution_status": "<string>",
      "last_execution_error": "<string>",
      "event_counter": 0,
      "last_cooldown_at": "2023-11-07T05:31:56Z",
      "baseline_snapshot": {},
      "last_drift_measurement": {},
      "last_volume_measurement": {},
      "last_condition_check_at": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "created_by": "<string>"
    }
  ],
  "total": 123,
  "offset": 123,
  "limit": 123
}
{
  "status": 123,
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>",
    "details": {}
  },
  "success": false
}
{
  "status": 123,
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>",
    "details": {}
  },
  "success": false
}
{
  "status": 123,
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>",
    "details": {}
  },
  "success": false
}
{
  "status": 123,
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>",
    "details": {}
  },
  "success": false
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
{
  "status": 123,
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>",
    "details": {}
  },
  "success": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to list triggers with filters.

action_type
enum<string> | null

Filter by action type

Available options:
cluster,
taxonomy_enrichment,
batch_rerun,
collection_trigger
trigger_type
enum<string> | null

Filter by trigger type

Available options:
cron,
interval,
event,
conditional
status
enum<string> | null

Filter by status

Available options:
active,
paused,
disabled,
failed
resource_id
string | null

Filter by resource ID (cluster_id or taxonomy_id)

offset
integer
default:0

Pagination offset

Required range: x >= 0
limit
integer
default:50

Results per page

Required range: 1 <= x <= 1000
sort_by
string
default:created_at

Field to sort by

direction
string
default:desc

Sort direction (asc/desc)

Response

Successful Response

Response for list triggers request.

results
TriggerModel · object[]
required

List of triggers

total
integer
required

Total number of triggers

offset
integer
required

Current offset

limit
integer
required

Current limit