Hanzo
OpenapiPubsub

Request sends one request on the org's bus and waits for one reply — the…

Request sends one request on the org's bus and waits for one reply — the synchronous half of pub/sub, for callers speaking to a responder subscribed on…

POST /v1/pubsub/request

Addresshttps://api.hanzo.ai/v1/pubsub/request
MethodPOST
Operationpost_pubsub_request
AuthAuthorization: Bearer $HANZO_API_KEY

Request sends one request on the org's bus and waits for one reply — the synchronous half of pub/sub, for callers speaking to a responder subscribed on the NATS port. 404 when nobody is listening on the subject; 408 when a responder exists but no reply arrived within the timeout.

Request

5 fields, body application/json (required).

FieldInTypeRequiredDescription
databodystringData is the request payload, carried verbatim as UTF-8 text.
headersbodyobjectHeaders are optional request headers, one value per name.
headers.*bodystring
subjectbodystringSubject is the subject a responder listens on, in the org's namespace.
timeoutMsbodyintegerTimeoutMs bounds the wait for a reply.

Response

StatusBodyMeaning
200busMessageok

200 body — 6 fields.

FieldInTypeAlwaysDescription
databodystringData is the payload as UTF-8 text.
headersbodyobjectHeaders are the message's headers, when it carries any.
headers.*bodystring[]
seqbodyintegerSeq is the message's stream sequence — fetched messages only.
subjectbodystringSubject is the message's subject in the org's own namespace.
timebodystringTime is when the stream stored the message, RFC3339 — fetched messages only.

Failure carries the platform error shape — see Errors.

Examples

hanzo pubsub request

Pubsub API · All Hanzo APIs · Interactive reference

How is this guide?

On this page