Skip to content

Preview a driver spec's polls through an outpost

POST
/drivers:preview
curl --request POST \
--url https://example.com/api/v1/drivers:preview \
--header 'Content-Type: application/json' \
--data '{ "driver": "example", "inputs": { "additionalProperty": "example" }, "outpost": "edge-hq", "polls": [ "example" ], "spec": "example", "timeout_seconds": 1 }'

Runs a driver spec’s polls once through the outpost named, against the target its inputs name, and answers with what each poll read: the samples its emits extracted, each emit that did not locate, and an excerpt of the raw answer, masked of every secret the preview used. Nothing is stored. The spec is a stored driver (driver) or an unsaved one (spec); an invalid spec is a 422 listing its findings, as validate-driver-spec gives them. A preview runs a poll that is its own request (http, https, an snmp get, a tcp line); a poll that rides a held session or a bound socket needs an attached endpoint (run-endpoint-poll). A secret input must be one the caller may bind (secret:bind), since the preview hands it to the target named. A preview whose transport and target name an endpoint the outpost holds runs on that endpoint’s lane, never beside its other requests and ahead of its scheduled polls; when that endpoint’s gate is closed (refused, unreachable, or disrupted by a command), or the probe reads the target’s host unreachable, it is a 409 naming the reason, and nothing is sent. An outpost that is not connected is a 503, one that does not answer in time a 504; too many runs in flight, here or on the outpost’s operator lanes, is a 429. Audited on the outpost and on each secret used. Gated by driver:preview.

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
driver

A stored driver to preview, by name; or give spec

string
inputs

The inputs an attach would take (host, port, a secret by name); a secret must be one you may bind (secret:bind), since a preview hands it to the target

object
key
additional properties
string
outpost
required

The outpost that runs the preview, by name: the one that reaches the target

string
polls

The polls to run, by name; absent runs every poll

Array<string> | null
spec

A driver spec to preview inline, unsaved; or give driver

timeout_seconds

How long the outpost may take for the whole preview (default 15, at most 30)

integer format: int64
>= 1 <= 30

OK

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
driver

The stored driver previewed; absent for an inline spec

string
outpost
required

The outpost that ran it

string
results
required

One per poll

Array<object> | null
object
excerpt

What the fetch answered, before any emit read it, bounded and masked of every secret the preview used

string
excerpt_truncated

The answer was longer than the excerpt

boolean
faults

Each emit that did not locate or type, or the fetch that failed

Array<string> | null
poll
required

The poll that ran

string
samples
required

What its emits extracted

Array<object> | null
object
identity

The identity the sample’s record carried (a match key and its value), when its function declares one; the server lands it on the owner the conduit’s binding names

object
key
required

The match key, a registered property type

string
value
required

The value the record carried for it

string
labels

The sample’s labels, its instance among them

object
key
additional properties
string
lane

Event or log for an event or a log line; absent for a metric or a property

string
name
required

The key the emit landed

string
text

A property’s value, or an event’s or log line’s message

string
ts
required

When the sample was taken

string format: date-time
value

A metric’s number

number format: double
took_ms
required

How long the poll took on the outpost

integer format: int64
stored
required

Always false: a preview stores no sample

boolean
target
required

Where the polls were sent

string

Example

{
"$schema": "/api/v1/schemas/PreviewDriverOutputBody.json"
}

Error

Media type application/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}