Comparison

mod_http_admin_api/openapi.yaml @ 4576:cade5dac1003

mod_http_admin_api: Add endpoints for server maintenance
author Jonas Schäfer <jonas@wielicki.name>
date Thu, 27 May 2021 16:18:10 +0200
parent 4517:d6a3201a65c0
child 4777:883ad8b0a7c0
comparison
equal deleted inserted replaced
4575:5b4f43b90766 4576:cade5dac1003
435 description: successful operation 435 description: successful operation
436 content: 436 content:
437 application/json: 437 application/json:
438 schema: 438 schema:
439 $ref: '#/components/schemas/ServerInfo' 439 $ref: '#/components/schemas/ServerInfo'
440 /server/metrics:
441 get:
442 tags:
443 - server
444 summary: Get metrics from the running server
445 operationId: getServerMetrics
446 responses:
447 200:
448 description: successful operation
449 content:
450 application/json:
451 schema:
452 $ref: '#/components/schemas/ServerMetrics'
453 /server/announcement:
454 post:
455 tags:
456 - server
457 summary: Post an announcement to some or all users
458 operationId: postServerAnnouncement
459 requestBody:
460 description: Announcement parameters
461 required: true
462 content:
463 application/json:
464 schema:
465 $ref: "#/components/schemas/Announcement"
466 responses:
467 201:
468 description: Announcement has been sent
440 components: 469 components:
441 schemas: 470 schemas:
442 UserList: 471 UserList:
443 type: array 472 type: array
444 items: 473 items:
734 type: string 763 type: string
735 description: A friendly name for the service 764 description: A friendly name for the service
736 version: 765 version:
737 type: string 766 type: string
738 description: A human-readable version string 767 description: A human-readable version string
768 ServerMetrics:
769 type: object
770 description: A selection of instantaneous metrics of the prosody server
771 properties:
772 memory:
773 type: integer
774 description: RSS in bytes
775 cpu:
776 type: object
777 description: CPU time counter
778 required:
779 - value
780 - since
781 properties:
782 since:
783 type: float
784 description: The metric epoch as UNIX timestamp
785 value:
786 type: float
787 description: Seconds of CPU time used since the metric epoch
788 c2s:
789 type: integer
790 description: Number of active c2s sessions
791 Announcement:
792 type: object
793 description: An announcemen to post to users on the server
794 required:
795 - body
796 - recipients
797 properties:
798 body:
799 type: string
800 description: The message body to send
801 recipients:
802 description: List of recipients or one of the strings "online" or "all"