Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

Viewing file on branch master

1openapi: 3.0.0
2info:
3 contact: {}
4 description: A read/write API for the Matterbridge chat bridge.
5 license:
6 name: Apache 2.0
7 url: 'https://github.com/42wim/matterbridge/blob/master/LICENSE'
8 title: Matterbridge API
9 version: "0.1.0-oas3"
10paths:
11 /health:
12 get:
13 responses:
14 '200':
15 description: OK
16 content:
17 '*/*':
18 schema:
19 type: string
20 summary: Checks if the server is alive.
21 /message:
22 post:
23 responses:
24 '200':
25 description: OK
26 content:
27 application/json:
28 schema:
29 $ref: '#/components/schemas/config.OutgoingMessageResponse'
30 summary: Create a message
31 requestBody:
32 content:
33 application/json:
34 schema:
35 $ref: '#/components/schemas/config.OutgoingMessage'
36 description: Message object to create
37 required: true
38 /messages:
39 get:
40 responses:
41 '200':
42 description: OK
43 content:
44 application/json:
45 schema:
46 items:
47 $ref: '#/components/schemas/config.IncomingMessage'
48 type: array
49 security:
50 - ApiKeyAuth: []
51 summary: List new messages
52 /stream:
53 get:
54 responses:
55 '200':
56 description: OK
57 content:
58 application/x-json-stream:
59 schema:
60 $ref: '#/components/schemas/config.IncomingMessage'
61 summary: Stream realtime messages
62servers:
63 - url: /api
64components:
65 securitySchemes:
66 bearerAuth:
67 type: http
68 scheme: bearer
69 schemas:
70 config.IncomingMessage:
71 properties:
72 avatar:
73 description: URL to an avatar image
74 example: >-
75 https://secure.gravatar.com/avatar/1234567890abcdef1234567890abcdef.jpg
76 type: string
77 event:
78 description: >-
79 A specific matterbridge event. (see
80 https://github.com/42wim/matterbridge/blob/master/bridge/config/config.go#L16)
81 type: string
82 gateway:
83 description: Name of the gateway as configured in matterbridge.toml
84 example: mygateway
85 type: string
86 text:
87 description: Content of the message
88 example: 'Testing, testing, 1-2-3.'
89 type: string
90 username:
91 description: Human-readable username
92 example: alice
93 type: string
94 account:
95 description: Unique account name of format "[protocol].[slug]" as defined in matterbridge.toml
96 example: slack.myteam
97 type: string
98 channel:
99 description: Human-readable channel name of sending bridge
100 example: test-channel
101 type: string
102 id:
103 description: Unique ID of message on the gateway
104 example: slack 1541361213.030700
105 type: string
106 parent_id:
107 description: Unique ID of a parent message, if threaded
108 example: slack 1541361213.030700
109 type: string
110 protocol:
111 description: Chat protocol of the sending bridge
112 example: slack
113 type: string
114 timestamp:
115 description: Timestamp of the message
116 example: "1541361213.030700"
117 type: string
118 userid:
119 description: Userid on the sending bridge
120 example: U4MCXJKNC
121 type: string
122 extra:
123 description: Extra data that doesn't fit in other fields (eg base64 encoded files)
124 type: object
125 config.OutgoingMessage:
126 properties:
127 avatar:
128 description: URL to an avatar image
129 example: >-
130 https://secure.gravatar.com/avatar/1234567890abcdef1234567890abcdef.jpg
131 type: string
132 event:
133 description: >-
134 A specific matterbridge event. (see
135 https://github.com/42wim/matterbridge/blob/master/bridge/config/config.go#L16)
136 example: ""
137 type: string
138 gateway:
139 description: Name of the gateway as configured in matterbridge.toml
140 example: mygateway
141 type: string
142 text:
143 description: Content of the message
144 example: 'Testing, testing, 1-2-3.'
145 type: string
146 username:
147 description: Human-readable username
148 example: alice
149 type: string
150 type: object
151 required:
152 - gateway
153 - text
154 - username
155 config.OutgoingMessageResponse:
156 properties:
157 avatar:
158 description: URL to an avatar image
159 example: >-
160 https://secure.gravatar.com/avatar/1234567890abcdef1234567890abcdef.jpg
161 type: string
162 event:
163 description: >-
164 A specific matterbridge event. (see
165 https://github.com/42wim/matterbridge/blob/master/bridge/config/config.go#L16)
166 example: ""
167 type: string
168 gateway:
169 description: Name of the gateway as configured in matterbridge.toml
170 example: mygateway
171 type: string
172 text:
173 description: Content of the message
174 example: 'Testing, testing, 1-2-3.'
175 type: string
176 username:
177 description: Human-readable username
178 example: alice
179 type: string
180 account:
181 description: fixed api account
182 example: api.local
183 type: string
184 channel:
185 description: fixed api channel
186 example: api
187 type: string
188 id:
189 example: ""
190 type: string
191 parent_id:
192 example: ""
193 type: string
194 protocol:
195 description: fixed api protocol
196 example: api
197 type: string
198 timestamp:
199 description: Timestamp of the message
200 example: "1541361213.030700"
201 type: string
202 userid:
203 example: ""
204 type: string
205 extra:
206 example: null
207 type: object
208 type: object
209security:
210 - bearerAuth: []
211