LaserData Cloud
API Reference

Notifications

Create delivery channels, select event subscriptions, and read notification history

API Variables
ld-api-key
{tenant_id}

Set variables to auto-fill all examples and run requests in-browser.

Notification channels deliver platform and deployment events to external destinations. Channels belong to a tenant or division. Send requests to https://api.laserdata.cloud.

Reading requires notifications:read. Creation, updates, and deletion require notifications:manage.

Notification Types

List Notification Types

GET
/notifications/types

List all available event types that can be subscribed to.

bash
curl https://api.laserdata.cloud/notifications/types \
-H "ld-api-key: YOUR_API_KEY"
[
  { "type": "deployment_created", "name": "Deployment created" },
  { "type": "deployment_initialized", "name": "Deployment initialized" },
  { "type": "high_cpu_usage", "name": "High CPU usage" },
  { "type": "node_unreachable", "name": "Node unreachable" }
]
Deployment events
deployment_createddeployment_initializeddeployment_upgradeddeployment_deleteddeployment_certificates_rotateddeployment_secrets_rotated
Invitation events
invitation_createdinvitation_acceptedinvitation_rejected
Tenant events
tenant_config_updatedtenant_join_requestedmember_joined
Organization events
division_createddivision_updateddivision_deletedenvironment_createdenvironment_updatedenvironment_deleted
Health alerts
high_cpu_usagehigh_memory_usagehigh_disk_usagenode_unreachablecpu_usage_resolvedmemory_usage_resolveddisk_usage_resolvednode_reachable
Other
certificate_expiringbilling_limit_reached

Channels

A channel selects a destination through slack, webhook, or email. Slack uses an incoming webhook. Generic webhooks receive HTTPS POST requests with JSON. Destinations are encrypted at rest.

Create a Tenant Channel

POST
/tenants/{tenant_id}/channels

Create a notification channel scoped to the entire tenant.

bash
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/channels \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "channel": "slack",
  "name": "production-alerts",
  "destination": "https://hooks.slack.com/services/T00/B00/xxx",
  "settings": {
    "slack": {
      "channel": "#alerts",
      "username": "LaserData"
    }
  },
  "remarks": "Primary alerting channel"
}'
FieldRequiredDescription
channelYesChannel kind: slack, webhook, email
nameYesUnique name (1-100 chars)
destinationYesTarget URL or email address
settingsNoChannel-specific settings (Slack channel/username, webhook headers, etc.)
remarksNoNotes (max 500 chars)

A successful request returns 201 Created.

Create a Division Channel

POST
/tenants/{tenant_id}/divisions/{division_id}/channels

Create a notification channel scoped to a specific division.

bash
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/divisions/{division_id}/channels \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "channel": "webhook",
  "name": "ops-webhook",
  "destination": "https://example.com/webhooks/laserdata"
}'

List Channels

GET
/tenants/{tenant_id}/channels

List all notification channels for the tenant.

bash
curl "https://api.laserdata.cloud/tenants/{tenant_id}/channels?page=1&results=10&channel=slack" \
-H "ld-api-key: YOUR_API_KEY"
{
  "total_pages": 1,
  "total_results": 1,
  "page": 1,
  "items": [
    {
      "id": 1,
      "owner_kind": "tenant",
      "owner_id": 100,
      "channel": "slack",
      "name": "production-alerts",
      "enabled": true,
      "created_at": "2025-06-01T10:00:00Z",
      "updated_at": "2025-06-01T10:00:00Z"
    }
  ]
}

For a division, use GET /tenants/{tenant_id}/divisions/{division_id}/channels.

Query ParameterDescription
channelFilter by kind: slack, webhook, email
pagePage number
resultsItems per page (max 100)

Get Channel

GET
/tenants/{tenant_id}/channels/{channel_id}

Retrieve a specific channel by ID. Includes destination and settings (omitted in list).

bash
curl https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id} \
-H "ld-api-key: YOUR_API_KEY"
{
  "id": 1,
  "owner_kind": "tenant",
  "owner_id": 100,
  "channel": "slack",
  "name": "production-alerts",
  "enabled": true,
  "destination": "https://hooks.slack.com/services/T00/B00/xxx",
  "settings": {
    "slack": {
      "channel": "#alerts",
      "username": "LaserData"
    }
  },
  "remarks": "Primary alerting channel",
  "created_at": "2025-06-01T10:00:00Z",
  "updated_at": "2025-06-01T10:00:00Z"
}

For a division, use GET /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}.

Update Channel

PUT
/tenants/{tenant_id}/channels/{channel_id}

Update a channel's name, destination, settings, or enabled state. All fields optional.

bash
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id} \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "name": "updated-channel-name",
  "destination": "https://hooks.slack.com/services/T00/B00/new",
  "enabled": false
}'

Use enabled: false to disable delivery without deleting the channel. A successful request returns 204 No Content.

For a division, use PUT /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}.

Test Channel

POST
/tenants/{tenant_id}/channels/{channel_id}/test

Send a test notification to verify the channel is reachable and correctly configured. Rate limited to one test per 10 seconds.

bash
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/test \
-H "ld-api-key: YOUR_API_KEY"

A successful request returns 204 No Content.

For a division, use POST /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/test.

Delete Channel

DELETE
/tenants/{tenant_id}/channels/{channel_id}

Delete a channel and all its subscriptions.

bash
curl -X DELETE https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id} \
-H "ld-api-key: YOUR_API_KEY"

A successful request returns 204 No Content.

For a division, use DELETE /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}.


Subscriptions

Subscriptions select event types and optional resource scopes. Without subscriptions, a channel receives every event.

Create Subscription

POST
/tenants/{tenant_id}/channels/{channel_id}/subscriptions

Subscribe a channel to one or more event types. Optionally filter by tenant, division, environment, or deployment IDs.

bash
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/subscriptions \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "message_types": ["deployment_created", "deployment_deleted", "node_unreachable"],
  "scope_division_ids": [1],
  "scope_environment_ids": [10, 20]
}'
FieldRequiredDescription
message_typesYesNon-empty array of event type strings
scope_tenant_idsNoLimit to specific tenants
scope_division_idsNoLimit to specific divisions
scope_environment_idsNoLimit to specific environments
scope_deployment_idsNoLimit to specific deployments

An event must match every supplied scope level. Empty or omitted levels match all resources. A successful request returns 201 Created.

For a division, use POST /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/subscriptions.

Set Subscriptions (Replace All)

PUT
/tenants/{tenant_id}/channels/{channel_id}/subscriptions

Atomically replace all subscriptions for a channel in a single transaction.

bash
curl -X PUT https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/subscriptions \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "subscriptions": [
    {
      "message_types": ["deployment_created", "deployment_deleted"],
      "scope_division_ids": [1]
    },
    {
      "message_types": ["high_cpu_usage", "high_memory_usage", "high_disk_usage"],
      "scope_deployment_ids": [611298765432109056, 611298765432109057]
    }
  ]
}'

The supplied list replaces every existing subscription. A successful request returns 204 No Content.

For a division, use PUT /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/subscriptions.

List Subscriptions

GET
/tenants/{tenant_id}/channels/{channel_id}/subscriptions

List all subscriptions for a channel.

bash
curl "https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/subscriptions?page=1&results=10" \
-H "ld-api-key: YOUR_API_KEY"
{
  "total_pages": 1,
  "total_results": 1,
  "page": 1,
  "items": [
    {
      "id": 1,
      "channel_id": 100,
      "message_types": ["deployment_created", "deployment_deleted"],
      "scope_tenants": [{ "id": 1, "name": "Acme Corp" }],
      "scope_divisions": [{ "id": 10, "name": "Platform Eng" }],
      "created_at": "2025-06-01T10:00:00Z",
      "updated_at": "2025-06-01T10:00:00Z"
    }
  ]
}

Responses omit empty scope arrays. Each scope entry contains id and name.

For a division, use GET /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/subscriptions.

Get Subscription

GET
/tenants/{tenant_id}/channels/{channel_id}/subscriptions/{subscription_id}

Retrieve a specific subscription with full scope details.

bash
curl https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/subscriptions/{subscription_id} \
-H "ld-api-key: YOUR_API_KEY"
{
  "id": 1,
  "channel_id": 100,
  "message_types": ["deployment_created", "deployment_deleted"],
  "scope_tenants": [{ "id": 1, "name": "Acme Corp" }],
  "scope_divisions": [{ "id": 10, "name": "Platform Eng" }],
  "scope_environments": [{ "id": 100, "name": "Production" }],
  "scope_deployments": [{ "id": 611298765432109056, "name": "prod-cluster" }],
  "created_at": "2025-06-01T10:00:00Z",
  "updated_at": "2025-06-01T10:00:00Z"
}

For a division, use GET /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/subscriptions/{subscription_id}.

Delete Subscription

DELETE
/tenants/{tenant_id}/channels/{channel_id}/subscriptions/{subscription_id}

Remove a single subscription from a channel.

bash
curl -X DELETE https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/subscriptions/{subscription_id} \
-H "ld-api-key: YOUR_API_KEY"

A successful request returns 204 No Content.

For a division, use DELETE /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/subscriptions/{subscription_id}.


Notification History

Browse Notifications

GET
/tenants/{tenant_id}/channels/{channel_id}/notifications

Browse delivery history for a channel: event content, type, and timestamp.

bash
curl "https://api.laserdata.cloud/tenants/{tenant_id}/channels/{channel_id}/notifications?page=1&results=10" \
-H "ld-api-key: YOUR_API_KEY"
{
  "total_pages": 1,
  "total_results": 5,
  "page": 1,
  "items": [
    {
      "id": 1,
      "tenant_id": 100,
      "division_id": 10,
      "environment_id": 1,
      "deployment_id": 611298765432109056,
      "message_type": "deployment_initialized",
      "content": "Deployment prod-cluster has been initialized",
      "created_at": "2025-06-01T10:30:00Z"
    }
  ]
}

For a division, use GET /tenants/{tenant_id}/divisions/{division_id}/channels/{channel_id}/notifications.

On this page