Skip to main content
GET
/
monitors
/
runs
JavaScript
import ContextDev from 'context.dev';

const client = new ContextDev({
  apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted
});

const response = await client.monitors.listAccountRuns();

console.log(response.data);
import os
from context.dev import ContextDev

client = ContextDev(
api_key=os.environ.get("CONTEXT_DEV_API_KEY"), # This is the default and can be omitted
)
response = client.monitors.list_account_runs()
print(response.data)
package main

import (
"context"
"fmt"

"github.com/context-dot-dev/context-go-sdk"
"github.com/context-dot-dev/context-go-sdk/option"
)

func main() {
client := contextdev.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Monitors.ListAccountRuns(context.TODO(), contextdev.MonitorListAccountRunsParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
require "context_dev"

context_dev = ContextDev::Client.new(api_key: "My API Key")

response = context_dev.monitors.list_account_runs

puts(response)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use ContextDev\Client;
use ContextDev\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY') ?: 'My API Key');

try {
$response = $client->monitors->listAccountRuns(
cursor: 'cursor', limit: 1, status: 'queued'
);

var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}
context-dev monitors list-account-runs \
--api-key 'My API Key'
curl --request GET \
--url https://api.context.dev/v1/monitors/runs \
--header 'Authorization: Bearer <token>'
HttpResponse<String> response = Unirest.get("https://api.context.dev/v1/monitors/runs")
.header("Authorization", "Bearer <token>")
.asString();
{
  "data": [
    {
      "id": "run_123",
      "monitor_id": "mon_123",
      "change_detected": true,
      "baseline_created": true,
      "credits_charged": 1,
      "started_at": "2023-11-07T05:31:56Z",
      "completed_at": "2023-11-07T05:31:56Z",
      "change_id": "chg_123",
      "error": {
        "code": "fetch_failed",
        "message": "The target URL could not be fetched."
      }
    }
  ],
  "has_more": true,
  "next_cursor": "<string>"
}
{
"message": "<string>",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}
0 Credits

Authorizations

Authorization
string
header
required

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

Query Parameters

status
enum<string>

Lifecycle status of a run. skipped runs never executed — see skip_reason (insufficient credits, monitor paused, or superseded by a concurrent run).

Available options:
queued,
running,
completed,
failed,
skipped
limit
integer
default:25
Required range: 1 <= x <= 100
cursor
string

Response

A paginated list of runs

data
object[]
required
has_more
boolean
required
next_cursor
string | null
required