-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
055cb50
commit e92dfb9
Showing
2 changed files
with
468 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: BifroMQ RESTful API | ||
version: "1.0.2" | ||
paths: | ||
/expireinbox: | ||
delete: | ||
summary: Expire inbox manually | ||
operationId: handle | ||
parameters: | ||
- name: req_id | ||
in: header | ||
description: optional caller provided request id | ||
schema: | ||
type: integer | ||
format: int64 | ||
- name: tenant_id | ||
in: header | ||
description: the tenant id | ||
required: true | ||
schema: | ||
type: string | ||
- name: expiry_seconds | ||
in: header | ||
description: the inboxes expiry time | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
"200": | ||
description: Success | ||
/kill: | ||
delete: | ||
summary: Disconnect a MQTT client connection | ||
operationId: handle_1 | ||
parameters: | ||
- name: req_id | ||
in: header | ||
description: optional caller provided request id | ||
schema: | ||
type: integer | ||
format: int64 | ||
- name: tenant_id | ||
in: header | ||
description: the tenant id | ||
required: true | ||
schema: | ||
type: string | ||
- name: user_id | ||
in: header | ||
description: the user id of the MQTT client connection to be disconnected | ||
required: true | ||
schema: | ||
type: string | ||
- name: client_type | ||
in: header | ||
description: the client type | ||
required: true | ||
schema: | ||
type: string | ||
- name: client_meta_* | ||
in: header | ||
description: "the metadata header about the kicker client, must be started\ | ||
\ with client_meta_" | ||
schema: | ||
type: string | ||
responses: | ||
"200": | ||
description: Success | ||
"404": | ||
description: Not Found | ||
/pub: | ||
post: | ||
summary: Publish a message to given topic | ||
operationId: handle_2 | ||
parameters: | ||
- name: req_id | ||
in: header | ||
description: optional caller provided request id | ||
schema: | ||
type: integer | ||
format: int64 | ||
- name: tenant_id | ||
in: header | ||
description: the tenant id | ||
required: true | ||
schema: | ||
type: string | ||
- name: topic | ||
in: header | ||
description: the message topic | ||
required: true | ||
schema: | ||
type: string | ||
- name: client_type | ||
in: header | ||
description: the client type | ||
required: true | ||
schema: | ||
type: string | ||
- name: pub_qos | ||
in: header | ||
description: QoS of the message to be distributed | ||
required: true | ||
schema: | ||
type: string | ||
- name: retain | ||
in: header | ||
description: the message should be retained | ||
schema: | ||
type: string | ||
- name: client_meta_* | ||
in: header | ||
description: "the metadata header about the kicker client, must be started\ | ||
\ with client_meta_" | ||
schema: | ||
type: string | ||
requestBody: | ||
description: Message payload will be treated as binary | ||
content: | ||
application/octet-stream: {} | ||
required: true | ||
responses: | ||
"200": | ||
description: Success | ||
/sub: | ||
put: | ||
summary: Add a topic subscription to an inbox | ||
operationId: handle_3 | ||
parameters: | ||
- name: req_id | ||
in: header | ||
description: optional caller provided request id | ||
schema: | ||
type: integer | ||
format: int64 | ||
- name: tenant_id | ||
in: header | ||
description: the tenant id | ||
required: true | ||
schema: | ||
type: string | ||
- name: topic_filter | ||
in: header | ||
description: the topic filter to add | ||
required: true | ||
schema: | ||
type: string | ||
- name: sub_qos | ||
in: header | ||
description: the qos of the subscription | ||
required: true | ||
schema: | ||
type: string | ||
enum: | ||
- "0" | ||
- "1" | ||
- "2" | ||
- name: inbox_id | ||
in: header | ||
description: the inbox for receiving subscribed messages | ||
required: true | ||
schema: | ||
type: string | ||
- name: deliverer_key | ||
in: header | ||
description: deliverer key for subBroker | ||
schema: | ||
type: string | ||
- name: subbroker_id | ||
in: header | ||
description: the id of the subbroker hosting the inbox | ||
required: true | ||
schema: | ||
type: integer | ||
format: int32 | ||
responses: | ||
"200": | ||
description: Success | ||
headers: | ||
sub_qos: | ||
description: the sub qos granted | ||
style: simple | ||
schema: | ||
enum: | ||
- "0" | ||
- "1" | ||
- "2" | ||
/unsub: | ||
delete: | ||
summary: Remove a topic subscription from an inbox | ||
operationId: handle_4 | ||
parameters: | ||
- name: req_id | ||
in: header | ||
description: optional caller provided request id | ||
schema: | ||
type: integer | ||
format: int64 | ||
- name: tenant_id | ||
in: header | ||
description: the tenant id | ||
required: true | ||
schema: | ||
type: string | ||
- name: topic_filter | ||
in: header | ||
description: the topic filter to remove | ||
required: true | ||
schema: | ||
type: string | ||
- name: inbox_id | ||
in: header | ||
description: the inbox for receiving subscribed messages | ||
required: true | ||
schema: | ||
type: string | ||
- name: deliverer_key | ||
in: header | ||
description: deliverer key for subBroker | ||
schema: | ||
type: string | ||
- name: subbroker_id | ||
in: header | ||
description: the id of the subbroker hosting the inbox | ||
required: true | ||
schema: | ||
type: integer | ||
format: int32 | ||
responses: | ||
"200": | ||
description: Success | ||
"404": | ||
description: Topic filter not found |
Oops, something went wrong.