]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Add documentation for component actions
authorMarcin Haba <marcin.haba@bacula.pl>
Fri, 9 Dec 2022 14:56:06 +0000 (15:56 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Mon, 9 Jan 2023 12:34:42 +0000 (13:34 +0100)
gui/baculum/protected/API/openapi_baculum.json

index 1fd74dafd721158d0e5bc4ee5161ad661dade720..74472c08fd0770cbed9c21e94afb357cd0462260 100644 (file)
                                ]
                        }
                },
+               "/api/v2/actions/{component}/{action}/": {
+                       "get": {
+                               "tags": ["actions"],
+                               "summary": "Run Bacula component action",
+                               "description": "Run Bacula component action.",
+                               "responses": {
+                                       "200": {
+                                               "description": "Run Bacula component action",
+                                               "content": {
+                                                       "application/json": {
+                                                               "schema": {
+                                                                       "type": "object",
+                                                                       "properties": {
+                                                                               "output": {
+                                                                                       "type": "string"
+                                                                               },
+                                                                               "error": {
+                                                                                       "type": "integer",
+                                                                                       "description": "Error code",
+                                                                                       "enum": [0, 110, 111, 112, 113, 1000]
+                                                                               }
+                                                                       }
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               },
+                               "parameters": [
+                                       {
+                                               "name": "component",
+                                               "in": "path",
+                                               "required": true,
+                                               "description": "Component name: director, storage or client.",
+                                               "schema": {
+                                                       "type": "string"
+                                               }
+                                       },
+                                       {
+                                               "name": "action",
+                                               "in": "path",
+                                               "required": true,
+                                               "description": "Component action: start, stop or restart.",
+                                               "schema": {
+                                                       "type": "string"
+                                               }
+                                       }
+                               ]
+                       }
+               },
                "/api/v2/objects": {
                        "get": {
                                "tags": ["objects"],