Files
mesh/testdata/device_link_paths.json
waozi 35a0703552 Add device link paths to the OpenAPI baseline
The docs baseline tests compare the served spec with fixtures, so the three
device link paths need theirs.
2026-10-10 18:30:28 -03:00

18 lines
1.3 KiB
JSON

{
"/api/v1/link/put": {"post": {
"summary": "Send one sealed message through a device link",
"description": "Body: {\"id\": 32 lowercase hex link ID shown in a QR code, \"slot\": \"request\" or \"response\", \"data\": sealed text up to 16384 bytes}. Each slot is written once. Links expire ten minutes after their first message. Messages are sealed between the two devices; the node relays them without reading them.",
"responses": {"200": {"description": "Message stored"}, "400": {"description": "Invalid link, slot or message"}, "409": {"description": "Slot already written"}, "429": {"description": "Rate limit exceeded"}}
}},
"/api/v1/link/get": {"post": {
"summary": "Read a device link slot",
"description": "Body: {\"id\", \"slot\"}. Returns {\"data\"} once the other device has written the slot.",
"responses": {"200": {"description": "Sealed message"}, "404": {"description": "Waiting for the other device, or the link expired"}, "429": {"description": "Rate limit exceeded"}}
}},
"/api/v1/link/close": {"post": {
"summary": "Forget a device link",
"description": "Body: {\"id\"}. Either device closes the link once it is connected or cancelled.",
"responses": {"200": {"description": "Link removed"}, "400": {"description": "Invalid link"}}
}}
}