Skip to main content
GET
/
v1
/
alerts
/
executions
/
{execution_id}
Get Alert Execution
curl --request GET \
  --url https://api.mixpeek.com/v1/alerts/executions/{execution_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.mixpeek.com/v1/alerts/executions/{execution_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.mixpeek.com/v1/alerts/executions/{execution_id}', 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/alerts/executions/{execution_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://api.mixpeek.com/v1/alerts/executions/{execution_id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.mixpeek.com/v1/alerts/executions/{execution_id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mixpeek.com/v1/alerts/executions/{execution_id}")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "alert_id": "<string>",
  "collection_id": "<string>",
  "triggered": true,
  "match_count": 1,
  "executed_at": "<string>",
  "duration_ms": 1,
  "execution_id": "<string>",
  "matches": [
    {
      "document_id": "<string>",
      "score": 0.5,
      "asset_id": "<string>",
      "matched_features": {},
      "metadata": {}
    }
  ],
  "source_documents": [
    "<string>"
  ]
}
{
"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.

Path Parameters

execution_id
string
required

Execution ID (exec_...)

Response

Successful Response

Result of an alert execution.

Captures the outcome of running an alert against one or more documents, including whether the alert was triggered and what matched.

Attributes: alert_id: ID of the alert that was executed collection_id: Collection the alert was executed against execution_id: Unique identifier for this execution triggered: Whether the alert was triggered (i.e., retriever returned results) match_count: Number of matches found matches: List of match results (if include_matches was True) source_documents: Document IDs that triggered the alert check executed_at: When the alert was executed duration_ms: How long the execution took

alert_id
string
required

ID of the alert that was executed

collection_id
string
required

Collection the alert was executed against

triggered
boolean
required

Whether the alert was triggered

match_count
integer
required

Number of matches found

Required range: x >= 0
executed_at
string
required

ISO 8601 timestamp when the alert was executed

duration_ms
integer
required

How long the execution took in milliseconds

Required range: x >= 0
execution_id
string

Unique identifier for this execution

matches
AlertMatchResult · object[] | null

List of match results

source_documents
string[]

Document IDs that triggered the alert check