Get ping instructions for a check
Returns everything needed to make this monitor actually report: the ping URL, copy-paste check-in snippets, and the three reporting mechanisms (how_to, hook_install, run_wrapper) together.
This is the exact payload the MCP get_ping_instructions tool returns — call this endpoint right after creating a check to hand an agent (or a human) everything it needs in one response, rather than composing curl commands from ping_url by hand.
Also carries the OpenTelemetry environment lines (otel_traces_endpoint, otel_resource_attributes, otel_headers_hint, otel_env_lines) for a run that wants to send traces alongside its pings — see those fields' own descriptions on PingInstructions.
hook_tool=codex or hook_tool=antigravity makes hook_install that tool's install instead of Claude Code's; nothing else in the response changes.
404 if the check does not exist in the authenticated project (no existence oracle).
Request
- Base URL: https://app.lastping.dev
- URL: https://app.lastping.dev/api/v1/checks/{id}/ping-instructions
- Auth: API key in header X-Api-Key
Query parameters
Which tool's one-time install hook_install carries. Omit for Claude Code's.
Response
Ping instructions for this check.
Example response
{
"otel_traces_endpoint": "https://ping.lastping.dev/v1/traces",
"otel_resource_attributes": "lastping.monitor_id=550e8400-e29b-41d4-a716-446655440000",
"otel_headers_hint": "Authorization=Bearer <your tracing key>",
"otel_env_lines": [
"export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=\"https://ping.lastping.dev/v1/traces\"",
"export OTEL_EXPORTER_OTLP_PROTOCOL=\"http/protobuf\"",
"export OTEL_RESOURCE_ATTRIBUTES=\"lastping.monitor_id=550e8400-e29b-41d4-a716-446655440000\"",
"export OTEL_EXPORTER_OTLP_HEADERS=\"Authorization=Bearer <your tracing key>\""
]
}Changes
No recorded changes to this operation across all 2 revisions of this API.