Skip to content

Commit

Permalink
1. add swagger yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Gujiawei-Edinburgh committed Oct 16, 2023
1 parent 055cb50 commit e92dfb9
Show file tree
Hide file tree
Showing 2 changed files with 468 additions and 0 deletions.
234 changes: 234 additions & 0 deletions website/docs/07_operations/swagger/BifroMQ-API.yaml
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
Loading

0 comments on commit e92dfb9

Please sign in to comment.