Skip to content

Export API reference

The org's events as OpenTelemetry logs, sent to your OTLP/HTTP endpoint.

Base URL: https://api.withruntime.com. Authentication, idempotency and errors work the same way for every product.

Its states: active, deleted.

Updated .md

Endpoints#

Method Path Description
POST /v2/otel Create a export
GET /v2/otel List otel
DELETE /v2/otel/{id} Delete a export

Create a export#

POST /v2/otel

Makes an OpenTelemetry export.

Its action, for a key's grant: otel:create.

Body: a ExportCreate.

Returns a Export.

Examples:

Terminalcurl -X POST "https://api.withruntime.com/v2/otel" \  -H "Authorization: Bearer $RUNTIME_API_KEY" \  -H "Content-Type: application/json" \  -d '{ "endpoint": "example" }'
TypeScriptimport { Runtime } from "withruntime";const runtime = new Runtime(); // RUNTIME_API_KEY from the environmentconst result = await runtime.otel.create({ endpoint: "example" });
Pythonfrom withruntime import Runtimeruntime = Runtime()  # RUNTIME_API_KEY from the environmentresult = runtime.otel.create(endpoint="example")
rubyrequire "withruntime"kit = Withruntime::Generated::Kit.new # RUNTIME_API_KEY from the environmentresult = kit.otel.create(endpoint: "example")
Terminalruntime otel create --endpoint example

List otel#

GET /v2/otel

Lists the org's, oldest first.

Its action, for a key's grant: otel:list.

Query:

Field Type Required Description
cursor string No Where the page starts: a page's next.
limit integer No The most items the page holds. At least 1. At most 200. Default: 50.

Returns a page: items, each a Export, and next, where the next page starts, none on the last.

In v1: GET /v1/otel-exports.

Examples:

Terminalcurl -X GET "https://api.withruntime.com/v2/otel" \  -H "Authorization: Bearer $RUNTIME_API_KEY"
TypeScriptimport { Runtime } from "withruntime";const runtime = new Runtime(); // RUNTIME_API_KEY from the environmentconst result = await runtime.otel.list();
Pythonfrom withruntime import Runtimeruntime = Runtime()  # RUNTIME_API_KEY from the environmentresult = runtime.otel.list()
rubyrequire "withruntime"kit = Withruntime::Generated::Kit.new # RUNTIME_API_KEY from the environmentresult = kit.otel.list
Terminalruntime otel list

Delete a export#

DELETE /v2/otel/{id}

Deletes it: nothing more is sent to it.

Its action, for a key's grant: otel:delete.

Path: id.

Returns a Export.

Examples:

Terminalcurl -X DELETE "https://api.withruntime.com/v2/otel/EXPORT_ID" \  -H "Authorization: Bearer $RUNTIME_API_KEY"
TypeScriptimport { Runtime } from "withruntime";const runtime = new Runtime(); // RUNTIME_API_KEY from the environmentconst result = await runtime.otel.delete("EXPORT_ID");
Pythonfrom withruntime import Runtimeruntime = Runtime()  # RUNTIME_API_KEY from the environmentresult = runtime.otel.delete("EXPORT_ID")
rubyrequire "withruntime"kit = Withruntime::Generated::Kit.new # RUNTIME_API_KEY from the environmentresult = kit.otel.delete("EXPORT_ID")
Terminalruntime otel delete EXPORT_ID

Objects#

ExportCreate

An OpenTelemetry export to make.

Field Type Required Description
endpoint string Yes The OTLP/HTTP endpoint's base URL (https).
headers object of strings No Headers sent with each request (an API key), at most 16.
events list of string No The events to send it; ["*"] (every one) when omitted.

Export

An OpenTelemetry export: the events as OTLP logs, POSTed to <endpoint>/v1/logs.

Field Type Required Description
id string Yes Its ID.
object one of otel Yes Always otel.
endpoint string Yes The OTLP/HTTP endpoint's base URL (https); in a list, its origin alone.
headerNames list of string Yes The names of the headers sent with each request; their values are never shown.
events list of string Yes The events it is sent; * for every one.
state one of active, deleted Yes active while it is sent to; deleted once deleted: a delete's answer.
createdAt string (RFC 3339) Yes When it was made.
deletedAt string (RFC 3339) No When it was deleted: a delete's answer, its state deleted.
Try it on your own work.Signing up takes no card. Your first sandbox asks for one, and the trial starts then. Or paste the setup prompt into your agent.
Start your free trial