Monitors API

Set up continuous monitoring for browser extensions and receive alerts via webhooks.

The Monitors API allows you to set up continuous monitoring for browser extensions. Receive alerts when extensions update, change permissions, or exhibit suspicious behavior.

Overview

Extension monitors track:

  • Version updates
  • Permission changes
  • Manifest modifications
  • Status changes (active/obsolete)
  • Publisher updates

List Monitors

Retrieve all monitors for your account.

GET /api/v1/monitors

Example Request

curl -X GET "https://extensionauditor.com/api/v1/monitors" \
  -H "Cookie: session=your_session_cookie"

Example Response

{
  "success": true,
  "data": {
    "monitors": [
      {
        "id": "monitor-uuid-1",
        "account_id": "account-uuid",
        "extension_id": "blemhmgimpnomifkjoinlelbmgoljddm",
        "enabled": true,
        "created_at": "2024-01-15T10:30:00Z",
        "updated_at": "2024-01-15T10:30:00Z"
      },
      {
        "id": "monitor-uuid-2",
        "account_id": "account-uuid",
        "extension_id": "abcdefghijklmnopqrstuvwxyz123456",
        "enabled": false,
        "created_at": "2024-01-10T08:00:00Z",
        "updated_at": "2024-01-12T14:30:00Z"
      }
    ]
  }
}

Create Monitor

Create a new extension monitor.

POST /api/v1/monitors

Request Body

{
  "extension_id": "blemhmgimpnomifkjoinlelbmgoljddm",
  "enabled": true
}
FieldTypeDefaultDescription
extension_idstringrequiredExtension ID to monitor
enabledbooleantrueWhether monitor is active

Example Request

curl -X POST "https://extensionauditor.com/api/v1/monitors" \
  -H "Cookie: session=your_session_cookie" \
  -H "Content-Type: application/json" \
  -d '{"extension_id": "blemhmgimpnomifkjoinlelbmgoljddm", "enabled": true}'

Example Response

{
  "success": true,
  "data": {
    "monitor": {
      "id": "new-monitor-uuid",
      "account_id": "account-uuid",
      "extension_id": "blemhmgimpnomifkjoinlelbmgoljddm",
      "enabled": true,
      "created_at": "2024-01-20T12:00:00Z",
      "updated_at": "2024-01-20T12:00:00Z"
    }
  }
}

Error: Monitor Already Exists

{
  "success": false,
  "error": "A monitor already exists for this extension"
}

Get Monitor

Retrieve a specific monitor by ID.

GET /api/v1/monitors/{monitorId}

Path Parameters

ParameterTypeDescription
monitorIdstring (UUID)Monitor identifier

Example Request

curl -X GET "https://extensionauditor.com/api/v1/monitors/monitor-uuid" \
  -H "Cookie: session=your_session_cookie"

Update Monitor

Update monitor settings.

PATCH /api/v1/monitors/{monitorId}

Request Body

{
  "enabled": false
}

Delete Monitor

Delete a monitor.

DELETE /api/v1/monitors/{monitorId}

Example Request

curl -X DELETE "https://extensionauditor.com/api/v1/monitors/monitor-uuid" \
  -H "Cookie: session=your_session_cookie"

Webhooks

Configure webhook destinations to receive alerts when monitored extensions change.

List Webhooks

GET /api/v1/monitors/{monitorId}/webhooks

Create Webhook

POST /api/v1/monitors/{monitorId}/webhooks

Request Body

{
  "url": "https://your-server.com/webhook/extension-alerts",
  "events": ["version_update", "permission_change", "status_change"],
  "secret": "your-webhook-secret"
}
FieldTypeDescription
urlstringWebhook endpoint URL
eventsarrayEvent types to receive
secretstringSecret for HMAC signature verification

Event Types

EventDescription
version_updateExtension version changed
permission_changePermissions added or removed
manifest_changeManifest file modified
status_changeExtension status changed (active/obsolete)
security_alertSecurity issue detected

Webhook Payload

{
  "event": "permission_change",
  "timestamp": "2024-01-20T12:00:00Z",
  "monitor_id": "monitor-uuid",
  "extension_id": "blemhmgimpnomifkjoinlelbmgoljddm",
  "data": {
    "extension_name": "Example Extension",
    "previous_version": "1.0.0",
    "new_version": "1.1.0",
    "permissions_added": ["tabs", "history"],
    "permissions_removed": [],
    "risk_level_change": {
      "from": "low",
      "to": "medium"
    }
  }
}

Webhook Signature

Webhooks include an HMAC-SHA256 signature for verification:

X-Signature: sha256=<hmac_signature>

Verify the signature:

import hmac
import hashlib

def verify_signature(payload, signature, secret):
    expected = 'sha256=' + hmac.new(
        secret.encode(),
        payload.encode(),
        hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(signature, expected)

Delete Webhook

DELETE /api/v1/monitors/{monitorId}/webhooks/{webhookId}

Monitor Events

Query historical events for a monitor.

GET /api/v1/monitors/{monitorId}/events

Query Parameters

ParameterTypeDescription
pageintegerPage number
page_sizeintegerItems per page
event_typestringFilter by event type
start_datestringStart date (ISO 8601)
end_datestringEnd date (ISO 8601)

Example Response

{
  "success": true,
  "result": [
    {
      "id": "event-uuid",
      "monitor_id": "monitor-uuid",
      "event_type": "version_update",
      "extension_id": "blemhmgimpnomifkjoinlelbmgoljddm",
      "details": {
        "from_version": "1.0.0",
        "to_version": "1.1.0"
      },
      "created_at": "2024-01-20T12:00:00Z"
    }
  ],
  "page": 1,
  "page_size": 25,
  "total_count": 15,
  "total_pages": 1
}

Detect Changes

Manually trigger change detection for a monitor.

POST /api/v1/monitors/{monitorId}/detect

This endpoint checks for changes immediately rather than waiting for the scheduled check.

Use Cases

Monitor Critical Business Extensions

# Create monitors for critical extensions
curl -X POST "https://extensionauditor.com/api/v1/monitors" \
  -H "Cookie: session=your_session_cookie" \
  -H "Content-Type: application/json" \
  -d '{"extension_id": "your-critical-extension-id"}'

# Set up webhook for alerts
curl -X POST "https://extensionauditor.com/api/v1/monitors/{monitorId}/webhooks" \
  -H "Cookie: session=your_session_cookie" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-siem.com/webhook",
    "events": ["permission_change", "security_alert"],
    "secret": "your-secret"
  }'

Integrate with Slack

Configure a webhook to post to Slack when extensions change:

{
  "url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
  "events": ["version_update", "permission_change"]
}

Error Responses

Status CodeDescription
400Invalid request parameters
401Authentication required
404Monitor not found
409Monitor already exists
429Rate limit exceeded
500Internal server error

Next Steps