Hanzo AI
OpenapiMq

Create purge

Removes messages from a stream, leaving its consumers in place.

POST /v1/mq/stream/{name}/purge

Addresshttps://api.hanzo.ai/v1/mq/stream/{name}/purge
MethodPOST
Operationpost_mq_stream_by_name_purge
AuthAuthorization: Bearer $HANZO_API_KEY

Removes messages from a stream, leaving its consumers in place.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
namepathstringyesName is the stream name, from the path.
filterbodystringFilter purges only messages on this org-relative subject (wildcards supported).
keepbodyintegerKeep retains that many newest messages.
namebodystringName is the stream name, from the path.

Response

StatusBodyMeaning
200purgeOutok

200 body — 1 field.

FieldInTypeAlwaysDescription
purgedbodyintegerPurged is the number of messages removed.

Failure carries the platform error shape — see Errors.

Examples

hanzo mq stream purge <name>

MQ API · All Hanzo APIs · Interactive reference

How is this guide?

On this page