API reference
Path Tools
/tools — the public operations of the PATH protocol, called with a Path Global key.
Scope tools.
https://api.pathglobal.finance/toolsPath Tools are the public operations of the PATH protocol, called with a Path Global key. Answers are PATH objects, as signed.
| Route | Answer |
|---|---|
GET / | { "tools": [ … ] }: each tool's id, group, title, summary, method, path, whether it is signed, whether it writes, own_member for a tool that runs for a PATH member of its own, and whether it is available to the caller |
GET /:tool | One tool |
POST /:tool | Runs a tool with the JSON body it takes. Takes Idempotency-Key |
Groups: registers, reach, requests, receipts, checkout, connect, tunnels. The input of
each tool is the input of its protocol operation; see the API reference. The
registers tools answer networks with endpoint_formats, the ids of their formats; the formats
themselves are read at the catalogue routes.
Tools of a member of its own
tunnels_exclusion (PUT /tunnels/exclusion, { "excluded": true }, signed, writes) sets whether
the caller, as a PATH member, is excluded from the tunnels of its network. It runs for a caller
whose membership of its own is proved, which this version does not take: it is listed
available: false, and a call answers 409 pathglobal.addresses.membership_unverified.
References and their owner
A reference created through a tool (a request, an instruction, a receipt, a checkout session, a
connection) is read and changed by the client that created it. A signed tool that names a reference
(request_revoke, request_paid, receipt_transition, checkout_read, connection_read,
connection_usage, connection_consume, connection_revoke) answers another client
404 pathglobal.core.not_found, with the same body as a reference that does not exist. The public
reads stay open, as on PATH: request_read, receipt_read, receipt_chain, instruction_read and
object. The payee receipts of deposits (Endpoints)
are read this way; no client moves them.
In test mode
A test key is answered by the sandbox, from the subjects, addresses and aliases of the key, and
from the fixture payees of the sandbox network. Each
answer is the object of the protocol, with the members of the protocol, signed by the test key
published at /.well-known/path-keys (protocol_version 0.2.0). A tool the sandbox does not
serve answers 503 pathglobal.tools.unavailable.
| Tool | Answer | Protocol object |
|---|---|---|
sonar | kind: "sonar_answer": identifier_type, identifier_hash, requester, nonce, found, member, endpoint. Takes identifier_type, identifier and nonce | SONAR |
finder | { step1, step2 }: step1 is the SONAR answer, step2 is { follow, composed_by: "client" }, or null when nothing was found | FINDER |
sonar_federated | { nonce, holders, unavailable }; each holder is { network, member, endpoint, proof } | Federated SONAR |
resolver | kind: "resolver_answer": address, requester, standing: "holder", valid, accepts, limits, commitment, commitment_version, grammar: 2. accepts lists what the address accepts now as grammar-2 capabilities, in order of preference, each with its limits and reference_required on pledged terms. commitment and commitment_version are those of the latest pledge, null on derived terms. Takes key, a PATH address; an alias answers 400 pathglobal.tools.refused with details.path_code path.core.malformed_request and details.path_detail.field: "key" | RESOLVER |
resolver_lookup | The resolver_answer of the address an alias designates, with key (the alias normalised: lower case, separators removed), address, nonce and requester. Takes key, an alias alias:<network>:<name>, and nonce, in the signed body (PIP-0028). An alias that does not resolve answers 404 pathglobal.tools.refused with path.core.not_found, one answer for every case | RESOLVER |
commitment | type: "path.address.commitment": address, issuer, commitment, version, committed_at; null values on derived terms | Commitment |
payee_check | kind: "payee_check": key, requester, mode, result, subject_type, nonce, and display_name with close_match and shown. Takes key, mode, name with verify, and nonce | Payee check |
instruction_issue, instruction_read | type: "path.instruction", grammar: 2: reference, issuer, payee, via, beneficiary ({ format, value, fields? }), payment_reference, amount, limits, single_use, status: "open", expires_at, intent_version. instruction_issue takes address and via, a capability of the address's accepts, for a fixture payee or a PATH address issued in the sandbox. The instruction is open 30 minutes; payment_reference is set when the entry has reference_required. A capability outside the accepts answers 409 with path.instruction.capability_not_accepted, one with no beneficiary 409 with path.instruction.destination_unavailable, and an expired instruction is read as 410 with path.instruction.expired | Instructions |
request_create, request_read, request_revoke, request_paid | type: "path.request", grammar: 2: reference, issuer, payee, amount (an Amount, or null), accepts, intent_version (the latest pledged version, or null), order_reference, status (created, revoked, paid), settled_by, expires_at | Request |
receipt_issue, receipt_read, receipt_transition, receipt_chain | type: "path.receipt", grammar: 2: issued_by, payer, payee, request, instruction, via, sent, received, rail_references, status, reason_code, supersedes, route: null. A receipt issued by the payer is issued pending, names payee, and moves only to failed; with an instruction issued in the sandbox, its via and payee are those of the instruction. The chain lists every statement, oldest first | Receipt |
receipt_verify | { valid, reason? }. Takes envelope and, for a chain, chain, the statements before it, oldest first: each signature is verified, and each supersedes is the digest of the statement before it | Verify a receipt |
object | The request or the receipt of a reference | INTEROP |
discovery | The discovery document of the host, as served at /.well-known/path-configuration | Discovery |
networks, network, rails | The networks and rails of the register | Registers |
An address that is revoked, or replaced by rotation, is answered as PATH answers it
(PIP-0027): resolver, commitment, payee_check, request_create and
instruction_issue answer 410 pathglobal.tools.refused, with details.path_code
path.address.revoked and details.path_detail: { rotated }, true for a replaced address. The
answer never names another address. An address that does not exist answers 404.
A negative SONAR answer has the same members as a positive one, with found: false and member
and endpoint null. identifier_hash is opaque; the identifier is not in the answer. A revoked
or expired request is read as 410 pathglobal.tools.refused, with details.path_code
path.request.revoked or path.request.expired. request_paid needs settled receipts that cover
the request, otherwise 409 pathglobal.tools.refused with path.request.not_covered.
Errors
| Code | Status | When |
|---|---|---|
pathglobal.tools.unavailable | 503 | The tool is not available |
pathglobal.tools.refused | The PATH status; 502 for a server error | The protocol refused the operation; details.path_code carries the PATH code, and details.path_detail its detail when it has one |
pathglobal.addresses.membership_unverified | 409 | The tool runs for a PATH member of its own |
pathglobal.core.not_found | 404 | No tool has that id, or the reference is not one the caller created |
pathglobal.tools.answer_unverifiable | 502 | A signed answer Path Global reads does not verify against the keys of the operator that answered, or does not answer the question asked |
Proof
/proof — checks on a payment or a party, signed verdicts, and the decision on a verdict in review.
Liquidity
/liquidity — provider corridors and quotes, the pools, pool quotes and positions, the offers that deliver an amount on a node now, paths and depth between nodes, and pausing and resuming a pool.