{ "openapi": "3.1.0", "info": { "title": "Affinidi DID Hosting — edge HTTP surface", "description": "HTTP surface of the did-hosting-server edge node: public, unauthenticated DID resolution, a liveness probe, and the HTTPS binding of the Trust Task listener. The edge is written to only by its control plane's signed Trust Tasks, which arrive over TSP, DIDComm or this binding alike.", "contact": { "name": "Glenn Gore", "email": "glenn@affinidi.com" }, "license": { "name": "Apache-2.0" }, "version": "0.13.0" }, "paths": { "/.well-known/did-witness.json": { "get": { "tags": [ "resolve" ], "summary": "`GET /.well-known/did-witness.json` — root-DID witness.", "operationId": "serve_root_witness", "responses": { "200": { "description": "Root DID's did:webvh witness proofs", "content": { "application/json": {} } }, "404": { "description": "No root DID, or no witness file, hosted on this domain" }, "429": { "description": "This address's resolution rate exceeds `[server.resolve_rate_limit]`; see `Retry-After`", "content": { "application/json": {} } } } } }, "/.well-known/did.json": { "get": { "tags": [ "resolve" ], "summary": "`GET /.well-known/did.json` — root-DID did:web document.", "operationId": "serve_root_did_web", "responses": { "200": { "description": "Root DID's did:web document (for a did:webvh root, its did:web form)", "content": { "application/did+json": {} } }, "404": { "description": "No root DID hosted on this domain" }, "429": { "description": "This address's resolution rate exceeds `[server.resolve_rate_limit]`; see `Retry-After`", "content": { "application/json": {} } } } } }, "/.well-known/did.jsonl": { "get": { "tags": [ "resolve" ], "summary": "`GET /.well-known/did.jsonl` — root-DID webvh log.", "operationId": "serve_root_did_log", "responses": { "200": { "description": "Root DID's did:webvh log (JSONL)", "content": { "application/jsonl+json": {} } }, "304": { "description": "The `If-None-Match` tag is current" }, "404": { "description": "No root DID hosted on this domain" }, "429": { "description": "This address's resolution rate exceeds `[server.resolve_rate_limit]`; see `Retry-After`", "content": { "application/json": {} } } } } }, "/@": { "get": { "tags": [ "resolve" ], "summary": "`GET /@` — the community name.", "description": "The FAQ gives a name with an empty local part to the verifiable trust\ncommunity that owns the domain, and in this service the domain's own\nidentity is its root DID. So this resolves through exactly the same index\nas every other name: nothing special-cases the root slot here, because\n`validate_agent_name_binding` has already made `.well-known` the only\nmnemonic the empty name can be bound to.\n\nNeeds a separate handler only because a path parameter cannot capture an\nempty segment — `/@` never matches `/@{name}`.", "operationId": "serve_community", "responses": { "302": { "description": "Redirect; `Location` is the domain's root DID (the community name)" }, "404": { "description": "No community name bound, or `features.agent_names` is off" }, "429": { "description": "This address's resolution rate exceeds `[server.resolve_rate_limit]`; see `Retry-After`", "content": { "application/json": {} } } } } }, "/@{name}": { "get": { "tags": [ "resolve" ], "summary": "`GET /@{name}` and `GET /@{name}/{*context}`.", "description": "The optional `context` tail (`/@alice/h2hsummit`) is accepted and ignored\nfor the redirect target — it is the FAQ's context-path affordance, carried\nthrough for the caller's benefit, not part of the name's identity.", "operationId": "serve", "parameters": [ { "name": "name", "in": "path", "description": "An agent name bound to a hosted DID (claimed in its `alsoKnownAs`)", "required": true, "schema": { "type": "string" } } ], "responses": { "302": { "description": "Redirect; `Location` is the DID the name is bound to" }, "404": { "description": "No such name, or `features.agent_names` is off" }, "429": { "description": "This address's resolution rate exceeds `[server.resolve_rate_limit]`; see `Retry-After`", "content": { "application/json": {} } } } } }, "/@{name}/{context}": { "get": { "tags": [ "resolve" ], "summary": "`GET /@{name}/{context}` — the agent-name redirect with a context tail.", "operationId": "agent_name_context", "parameters": [ { "name": "name", "in": "path", "description": "An agent name bound to a hosted DID", "required": true, "schema": { "type": "string" } }, { "name": "context", "in": "path", "description": "Any further path; accepted and ignored for the redirect target", "required": true, "schema": { "type": "string" } } ], "responses": { "302": { "description": "Redirect; `Location` is the DID the name is bound to" }, "404": { "description": "No such name, or `features.agent_names` is off" }, "429": { "description": "This address's resolution rate exceeds `[server.resolve_rate_limit]`; see `Retry-After`", "content": { "application/json": {} } } } } }, "/api/health": { "get": { "tags": [ "system" ], "summary": "Unauthenticated liveness probe; degraded while the service's own DID is\nnot being served.", "operationId": "health", "responses": { "200": { "description": "Service is up and its own DID (if configured) resolves locally; returns status + version", "content": { "application/json": {} } }, "503": { "description": "Service is up but its own DID isn't being served locally, or it has not reconciled with its control plane within the staleness bound", "content": { "application/json": {} } } } } }, "/api/trust-tasks": { "post": { "tags": [ "trust-tasks" ], "summary": "Hand the posted document to the edge's one inbound dispatch and answer with\nits signed reply.", "description": "A document that fails `verify_control_plane` gets no answer, signed or\nunsigned: a signed refusal would settle a directive the control plane never\nsent, and an error document is an answer too. It is refused with a bare\n`403` and an empty body, as is a document that takes no reply. One that\ncould not be checked just now (its signer's DID could not be resolved, the\nreplay cache is full) is answered `503` with `Retry-After` and an empty\nbody, so the sender keeps it and sends it again.", "operationId": "receive", "requestBody": { "description": "A signed Trust Task document", "content": { "application/json": { "schema": { "type": "string" } } }, "required": true }, "responses": { "200": { "description": "The edge's signed reply document", "content": { "application/json": {} } }, "400": { "description": "The body is not a Trust Task document", "content": { "application/json": {} } }, "403": { "description": "The document was not accepted, or takes no reply; empty body" }, "408": { "description": "The body did not arrive in time" }, "413": { "description": "The body is larger than the listener accepts" }, "429": { "description": "This address's request rate exceeds the limit", "content": { "application/json": {} } }, "503": { "description": "The document could not be checked just now; send it again after `Retry-After`. Empty body" } } } }, "/{mnemonic}/did-witness.json": { "get": { "tags": [ "resolve" ], "summary": "`GET /{mnemonic}/did-witness.json`.", "operationId": "did_witness", "parameters": [ { "name": "mnemonic", "in": "path", "description": "Slot path of a hosted did:webvh", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The slot's did:webvh witness proofs", "content": { "application/json": {} } }, "404": { "description": "No DID, or no witness file, hosted at this path" }, "429": { "description": "This address's resolution rate exceeds `[server.resolve_rate_limit]`; see `Retry-After`", "content": { "application/json": {} } } } } }, "/{mnemonic}/did.json": { "get": { "tags": [ "resolve" ], "summary": "`GET /{mnemonic}/did.json`.", "operationId": "did_json", "parameters": [ { "name": "mnemonic", "in": "path", "description": "Slot path of a hosted DID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The slot's did:web document (a did:web record, or the did:web form of a did:webvh)", "content": { "application/did+json": {} } }, "404": { "description": "No DID hosted at this path" }, "429": { "description": "This address's resolution rate exceeds `[server.resolve_rate_limit]`; see `Retry-After`", "content": { "application/json": {} } } } } }, "/{mnemonic}/did.jsonl": { "get": { "tags": [ "resolve" ], "summary": "Combined fallback handler: walks each enabled method's dispatcher\nin priority order, returning the first match.", "description": "404 when no method recognises the URL. Callers expecting an SPA\n(daemon mode) check for 404 and then call the static handler.", "operationId": "serve_public", "parameters": [ { "name": "mnemonic", "in": "path", "description": "Slot path; the published did:webvh resolves at /{mnemonic}/did.jsonl", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "did:webvh log (JSONL) or did:web document for the slot", "content": { "application/jsonl+json": {} } }, "304": { "description": "The `If-None-Match` tag is current" }, "404": { "description": "No DID hosted at this path" }, "405": { "description": "A method other than GET or HEAD" }, "429": { "description": "This address's resolution rate exceeds `[server.resolve_rate_limit]`; see `Retry-After`", "content": { "application/json": {} } } } } } }, "components": {}, "tags": [ { "name": "trust-tasks", "description": "The HTTPS binding of the Trust Task listener" }, { "name": "resolve", "description": "Public, unauthenticated DID resolution" }, { "name": "system", "description": "Health / diagnostics" } ] }