LaserData Cloud
API Reference

API Reference

Call the management APIs with authentication, pagination, typed errors, and safe retries

View as Markdownllms.txt
API Variables
ld-api-key
{tenant_id}

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

LaserData Cloud provides a main API and regional Supervisor APIs. Programmatic requests use an ld-api-key header with a key whose role permits the operation.

These APIs manage resources, configuration, and monitoring. For application messages, queries, and agents, use laser-sdk in Rust, Python, TypeScript, or Go.

Base URLs

APIBase URLPurpose
Main APIhttps://api.laserdata.cloudOrganization, deployments, API keys, billing, notifications, and audit records
Supervisor API{supervisor_url}Deployment operations: configs, networking, metrics, logs, diagnostic snapshots, data backups

List Organization Deployments, List Deployments, and Get Deployment return each deployment's supervisor_url. An example is https://supervisor-aws-us.laserdata.cloud.

OpenAPI Schema

The operations an API key may call are also tools on the MCP servers, named by their operationId. Operations that need a console session, and account and operator routes, are not tools. When two services share an operation name, the later service's tool gets its name as a prefix, such as audit_get_deployment.

Each public service provides an OpenAPI 3.1 specification and browser, with request and response examples.

Agents and generators can start at https://laserdata.com/openapi.json, the Core management API specification. Individual service specifications are also available:

Each operation has a stable, unique operationId, description, typed parameters, and typed responses. For an LLM function tool, use operationId as its name. Use the description as guidance and request parameters or body schema as inputs. Send credentials only to the declared LaserData service base URL.

Main, Audit, Notifier

Open api.laserdata.cloud/docs and use the dropdown to select Core, Audit, or Notifier.

Supervisor (per region)

Each cloud and area has a supervisor specification at /docs:

Specifications declare ld_api_key and session_cookie. User-session endpoints explicitly require cookies and reject API keys. See Authentication.

Authentication

For API-key authentication, include ld-api-key:

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

Authentication explains scopes, security, and error responses.

Pagination

List endpoints accept these pagination parameters:

ParameterDefaultDescription
page1Page number (1-indexed)
results10Items per page (max 100)

Paginated bodies include items, page, total_results, and total_pages. The RFC 8288 Link header provides rel="first", prev, next, and last URLs. Clients can follow those links without parsing pagination fields.

IDs

Organization, workspace, environment, deployment, and other IDs are unsigned 64-bit integers, written as JSON numbers. Many are larger than 2^53, the largest integer a JavaScript number holds exactly, so JSON.parse and response.json() change them and the next call with that ID answers 404. In JavaScript and TypeScript, keep large numbers as text with a JSON.parse reviver that reads the source text, or a JSON parser with big integer support. Python, Rust with serde_json, and jq 1.7 or later read them exactly.

Request and Response Headers

HeaderDirectionPurpose
ld-api-keyrequestAPI key bearer credential (see Authentication)
idempotency-keyrequestOptional client-supplied key (max 255 chars) that makes POST, PUT, and PATCH requests safe to retry. See Idempotency
ld-requestresponseCorrelation ID for this request. Mirrored as instance in problem+json error bodies. Include it in support requests
idempotent-replayedresponsetrue when the response was served from the idempotency cache instead of re-running the handler
linkresponsePagination links (first, prev, next, last) on paged list responses
retry-afterresponseSeconds to wait before retrying. Sent on 429 and on transient 5xx
ld-tenant, ld-workspace, ld-environment, ld-deployment, ld-roleresponseCreated-resource ID headers, set on the matching POST endpoint when the new resource is created

Idempotency

POST, PUT, and PATCH accept optional idempotency-key for safe retries. The platform caches the first response for each (api_key, idempotency-key) pair for 10 minutes. Repeating the same body with the same key returns that response with idempotent-replayed: true. The handler does not run again.

  • This feature applies to API-key authentication. Console sessions do not use it.
  • A repeated key with a different body returns 409 Conflict and code: idempotency_error.
  • A retry while the original request runs returns 409 Conflict and code: idempotent_request_in_progress. Wait briefly before retrying.
  • DELETE is excluded because repeated deletion already has the same effect.
  • Audit has no endpoints that change state and does not advertise idempotency support.

Use the same request identity after network failures, CI retries, or queue redelivery, including when creating deployments.

Quick Start

Create a Free single-node deployment, then retrieve its details and credentials:

bash
# 1. Create a starter deployment (Free, single node on shared infrastructure)
curl -X POST https://api.laserdata.cloud/tenants/{tenant_id}/workspaces/{workspace_id}/deployments/starter \
-H "ld-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "cloud": "aws",
  "region": "us-west-1"
}'

# Response headers contain the created resource IDs:
# ld-environment: <environment_id>
# ld-deployment: <deployment_id>
bash
# 2. Get the deployment (once provisioned)
curl https://api.laserdata.cloud/tenants/{tenant_id}/workspaces/{workspace_id}/environments/{environment_id}/deployments/{deployment_id} \
-H "ld-api-key: YOUR_API_KEY"
bash
# 3. Get connection credentials
curl {supervisor_url}/deployments/{deployment_id}/credentials \
-H "ld-api-key: YOUR_API_KEY"

The credentials response holds connection_string for the deployment admin ld-admin, ready for Laser SDK and Iggy clients. It adds the root login only for a caller that also holds deployment:manage. See Get Deployment Credentials.

To find an existing deployment from an API key alone, List Organization Deployments returns every deployment the key can read in one call: GET https://api.laserdata.cloud/tenants/{tenant_id}/deployments.

HTTP Status Codes

CodeMeaning
200 OKRequest succeeded
202 AcceptedRequest accepted. Operation will complete asynchronously
400 Bad RequestInvalid parameters or request body
401 UnauthorizedMissing or invalid API key
403 ForbiddenAPI key valid but lacks required permission
404 Not FoundResource does not exist
409 ConflictResource already exists or state conflict
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorUnexpected server error

API Sections

On this page