Ga naar inhoud

Test a connection

POST
/api/v1/connections/{alias}/test
curl --request POST \
--url https://example.com/api/v1/connections/example/test \
--cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E

Tests the whole chain with one small read, as an application would: our gateway, the provider’s data plane (or its supplier’s), and the system behind it. It is a real request within the agreement, recorded like any other (decisions #78).

alias
required
string

The alias of the connection: the name in its gateway address.

The outcome, also when the test failed (ok: false).

Media typeapplication/json

The outcome of a connection test, as the UI shows it.

object
ok
required
boolean
stage

Where it stopped: connection (not active), own (our data plane), counterparty (theirs), agreement, backend or other.

string | null
status
integer | null format: int32
ms

Milliseconds.

integer | null format: int64
message
string | null
points

How many points the discovery listed.

integer | null
request

The request as an application makes it, without the key: method, url.

object | null
response

What came back: status, content_type, body (at most 64 KiB), bytes, truncated.

object | null

Example generated

{
"ok": true,
"stage": "example",
"status": 1,
"ms": 1,
"message": "example",
"points": 1,
"request": "example",
"response": "example"
}

No valid session, DPoP-bound token or API key.

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}

The caller lacks the role this operation needs; or a change with the session cookie came from a page of another site (cross_site_request, decisions #83).

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}

Not found.

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}