specter-v1
protocol — the contract Specter uses to reach external risk engines — but the flow
is identical for any protocol.
Prerequisites
- A Link instance and its base URL (see Plans & Access).
- A bearer token. The steps below note the scope each call needs — see Authentication.
- Credentials for the provider you want to connect (this example uses a card-risk provider).
Your instance URL follows the pattern
https://{instance}.eu1.on-hellgate.cloud — {instance} is your unique
slug and eu1 is the current environment. Substitute it in the examples below, and set $TOKEN to a bearer
token that holds the scope named in each step.Steps
Import a protocol
A protocol is a versioned contract, imported by URL. The URL must return a document matching the
protocol meta-schema. Requires The response includes the
admin:protocols:write.local_id you will use when invoking — here, specter-v1. Inspect the action
requirements (useful when writing mapping rules):Register a backend
A backend binds the protocol to a real provider — its host, credentials, an authentication strategy, and the
mapping rules that translate the protocol request into the
provider’s wire format and the response back. Requires Mapping leaves are strings carrying the mustache-style template grammar —
admin:backends:write.{{ expr | filter }}. Paths are
scoped: $req.body.* and $req.header.* for the caller’s request, $res.body.* and $res.header.* for the
provider’s response. See Backends for the full mapping model.Invoke an action
Call the protocol action. The HTTP method must match the action’s declared method. Requires Link validates the request, selects the matching backend, runs the mapping, and returns the protocol-shaped
result:The response carries an
invoke:execute.x-link-execution header with the execution ID, and server-timing with the call
timing. If more than one enabled backend implements the action, Link returns 409 — disambiguate with
?backend=acme-risk. See Invocation for method matching, backend
selection, and error codes.Next steps
Protocols
Actions, variants, versioning, and the meta-schema.
Backends
The mapping engine, authentication strategies, and mocks.
Invocation
Method matching, backend selection, and error handling.