Software /
code /
prosody-modules
Diff
mod_rest/README.markdown @ 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 |
parent | 4477:8df6cc648963 |
child | 4506:508cb880b163 |
line wrap: on
line diff
--- a/mod_rest/README.markdown Sun Feb 28 19:25:45 2021 +0100 +++ b/mod_rest/README.markdown Sun Feb 28 19:33:09 2021 +0100 @@ -101,6 +101,23 @@ entities (connected clients or remote servers) will not be returned, but can be forwarded via the callback API described in the next section. +### Simple info queries + +A subset of IQ stanzas can be sent as simple GET requests + +``` +curl https://prosody.example:5281/rest/version/example.com \ + --oauth2-bearer dmVyeSBzZWNyZXQgdG9rZW4K \ + -H 'Accept: application/json' +``` + +The supported queries are + +- `disco` +- `items` +- `version` +- `ping` + ## Receiving stanzas TL;DR: Set this webhook callback URL, get XML `POST`-ed there.