Changeset

5123:09dd378748b8

mod_rest: Add some GET-mapped iq-queries to OpenAPI documentation
author Kim Alvefur <zash@zash.se>
date Sat, 31 Dec 2022 16:57:40 +0100
parents 5122:25f39ceccbca
children 5124:8d5b9245275d
files mod_rest/README.markdown mod_rest/res/openapi.yaml
diffstat 2 files changed, 49 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_rest/README.markdown	Sat Dec 31 15:32:25 2022 +0100
+++ b/mod_rest/README.markdown	Sat Dec 31 16:57:40 2022 +0100
@@ -116,10 +116,16 @@
 
 The supported queries are
 
+-   `archive`
 -   `disco`
+-   `extdisco`
 -   `items`
+-   `lastactivity`
+-   `oob`
+-   `payload`
+-   `ping`
+-   `stats`
 -   `version`
--   `ping`
 
 ## Receiving stanzas
 
--- a/mod_rest/res/openapi.yaml	Sat Dec 31 15:32:25 2022 +0100
+++ b/mod_rest/res/openapi.yaml	Sat Dec 31 16:57:40 2022 +0100
@@ -203,6 +203,48 @@
         '200':
           $ref: '#/components/responses/success'
 
+  /rest/lastactivity/{to}:
+    get:
+      tags:
+      - query
+      summary: Query last activity of an entity. Sometimes used as "uptime" for servers.
+      security:
+      - basic: []
+      - token: []
+      parameters:
+      - $ref: '#/components/parameters/to'
+      responses:
+        '200':
+          $ref: '#/components/responses/success'
+
+  /rest/stats/{to}:
+    get:
+      tags:
+      - query
+      summary: Query an entity for statistics
+      security:
+      - basic: []
+      - token: []
+      parameters:
+      - $ref: '#/components/parameters/to'
+      responses:
+        '200':
+          $ref: '#/components/responses/success'
+
+  /rest/upload_request/{to}:
+    get:
+      tags:
+      - query
+      summary: Lorem ipsum
+      security:
+      - basic: []
+      - token: []
+      parameters:
+      - $ref: '#/components/parameters/to'
+      responses:
+        '200':
+          $ref: '#/components/responses/success'
+
 components:
   schemas:
     stanza: