Mercurial > prosody-modules
diff mod_rest/openapi.yaml @ 4478:7ab0c423688a
mod_rest: Support GET for certain IQ queries
Example:
GET /rest/version/example.com
200 OK
{ version: { name: "thing", version: "1.0.0" } }
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 28 Feb 2021 19:33:09 +0100 |
| parents | 8df6cc648963 |
| children | 356b5ad521a5 |
line wrap: on
line diff
--- a/mod_rest/openapi.yaml Sun Feb 28 19:25:45 2021 +0100 +++ b/mod_rest/openapi.yaml Sun Feb 28 19:33:09 2021 +0100 @@ -62,6 +62,109 @@ payload. 415: description: Unsupported mediatype. + /rest/ping/{to}: + get: + security: + - basic: [] + - token: [] + summary: Ping a local or remote server or other entity + responses: + 200: + content: + application/json: + schema: + type: object + application/xmpp+xml: + schema: + description: Single XMPP stanza in XML format. + example: | + <iq type="result"/> + description: OK + parameters: + - name: to + in: path + required: true + schema: + $ref: '#/components/schemas/to' + /rest/disco/{to}: + get: + security: + - basic: [] + - token: [] + summary: Query a remote entity for supported features + responses: + 200: + content: + application/json: + schema: + type: object + properties: + disco: + $ref: '#/components/schemas/disco' + application/xmpp+xml: + schema: + description: See XEP-0030 + description: OK + parameters: + - name: to + in: path + required: true + schema: + $ref: '#/components/schemas/to' + /rest/items/{to}: + get: + security: + - basic: [] + - token: [] + summary: Query an entity for related services, chat rooms or other items + responses: + 200: + content: + application/json: + schema: + type: object + properties: + disco: + $ref: '#/components/schemas/items' + application/xmpp+xml: + schema: + description: See XEP-0030 + description: OK + parameters: + - name: to + in: path + required: true + schema: + $ref: '#/components/schemas/to' + /rest/version/{to}: + get: + security: + - basic: [] + - token: [] + summary: Ask what software version is used + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/stanza' + application/xmpp+xml: + schema: + description: Single XMPP stanza in XML format. + example: | + <iq type="result"> + <query xmlns="jabber:iq:version"> + <name>Exodus</name> + <version>0.7.0.4</version> + </query> + </iq> + description: OK + parameters: + - name: to + in: path + required: true + schema: + $ref: '#/components/schemas/to' /rest/{kind}/{type}/{to}: post: responses:
