Skip to main content
GET
/
monitors
/
changes
/
{change_id}
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.retrieveChange('chg_123');

console.log(response.id);
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.retrieve_change(
"chg_123",
)
print(response.id)
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.GetChange(context.TODO(), "chg_123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ID)
}
require "context_dev"

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

response = context_dev.monitors.retrieve_change("chg_123")

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->retrieveChange('chg_123');

var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}
context-dev monitors retrieve-change \
--api-key 'My API Key' \
--change-id chg_123
curl --request GET \
--url https://api.context.dev/v1/monitors/changes/{change_id} \
--header 'Authorization: Bearer <token>'
HttpResponse<String> response = Unirest.get("https://api.context.dev/v1/monitors/changes/{change_id}")
.header("Authorization", "Bearer <token>")
.asString();
{
  "mode": "web",
  "id": "chg_123",
  "monitor_id": "mon_123",
  "run_id": "run_123",
  "title": "Acme pricing page changed",
  "summary": "The visible text on the page changed.",
  "detected_at": "2023-11-07T05:31:56Z",
  "url": "<string>",
  "confidence": 0.5,
  "diff": "<string>",
  "before_text_excerpt": "<string>",
  "after_text_excerpt": "<string>",
  "added_urls": [
    "<string>"
  ],
  "removed_urls": [
    "<string>"
  ],
  "added_url_count": 1,
  "removed_url_count": 1,
  "matched_urls": [
    "<string>"
  ],
  "matched_url_count": 1,
  "evidence": [
    {
      "before": "<string>",
      "after": "<string>",
      "url": "<string>"
    }
  ],
  "tags": [
    "pricing",
    "competitor"
  ]
}
{
"message": "<string>",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}
{
"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.

Path Parameters

change_id
string
required

Response

Change details

A detected change. mode is the constant web; target_type and change_detection_type describe the change, and which optional fields are present depends on them (page: diff + excerpts; sitemap: added_urls/removed_urls; semantic: query/confidence/importance/evidence/matched_urls).

mode
enum<string>
required

Top-level monitor category. Always web today; the concrete behavior is described by target and change_detection.

Available options:
web
id
string
required
Example:

"chg_123"

monitor_id
string
required
Example:

"mon_123"

run_id
string
required

The run that detected this change.

Example:

"run_123"

target_type
enum<string>
required
Available options:
page,
sitemap,
extract
change_detection_type
enum<string>
required
Available options:
exact,
semantic
title
string
required
Example:

"Acme pricing page changed"

summary
string
required
Example:

"The visible text on the page changed."

detected_at
string<date-time>
required
url
string<uri>
required
importance
enum<string>
Available options:
low,
medium,
high
confidence
number
Required range: 0 <= x <= 1
diff
string

Text diff between the previous and current page baseline (page targets).

before_text_excerpt
string
after_text_excerpt
string
added_urls
string<uri>[]

At most 500 URLs are included; the corresponding count field is always exact.

removed_urls
string<uri>[]

At most 500 URLs are included; the corresponding count field is always exact.

added_url_count
integer
Required range: x >= 0
removed_url_count
integer
Required range: x >= 0
matched_urls
string<uri>[]

At most 500 URLs are included; the corresponding count field is always exact.

matched_url_count
integer
Required range: x >= 0
evidence
object[]
tags
string[]

User-defined tags for grouping and filtering monitors and their changes.

Maximum array length: 20
Required string length: 1 - 50
Example:
["pricing", "competitor"]