Skip to main content
POST
connector.functions.test(side, request): runs the saved function or a draft; records and publishes nothing; an outbound test delivers for real

Authorizations

Authorization
string
header
required

An API key, or a session token on its own session

Path Parameters

idOrName
string
required

The connector's ID, or for connectors.get its name

side
enum<string>
required

The connector's side

Available options:
inbound,
outbound

Body

application/json

Inbound: a sample request, or a recorded delivery's request; outbound: a message delivered for real. With a draft, the draft runs instead of the saved version.

event
object
deliveryId
string
Pattern: ^dlv_[0-7][0-9a-hjkmnp-tv-z]{25}$
replay
boolean

With deliveryId: run as a replay would, with ctx.replay set.

message
object
draft
object

Unsaved code to run instead of the saved version, checked as set checks code.

Response

The result

side
enum<string>
required
Available options:
inbound,
outbound
version
integer | null
required

The saved version that ran; null for a draft.

result
enum<string>
required
Available options:
accept,
respond,
reject,
ok,
retryable,
permanent,
error,
timeout
answer
integer | null
required

Inbound: the HTTP status a real request would have been answered with.

dedupeKey
string | null
required

Inbound accept.

routes
object[] | null
required

Inbound accept: what a real request would deliver.

response
object | null
required

A handshake's answer.

externalId
string | null
required

Outbound ok.

retryAfter
integer | null
required

Outbound retryable: seconds.

code
string | null
required

Outbound permanent.

reason
string | null
required

Inbound reject; outbound retryable and permanent.

error
string | null
required

error and timeout, and an answer outside the contract.

durationMs
integer
required
Required range: x >= 0
logs
string
required

The last 4 KiB the code wrote to its standard output and error.