]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Update API documentation to job estimate endpoint
authorMarcin Haba <marcin.haba@bacula.pl>
Tue, 14 May 2019 17:30:09 +0000 (19:30 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 14 Dec 2019 14:50:01 +0000 (15:50 +0100)
gui/baculum/protected/API/openapi_baculum.json

index 11ad23b834ec07494549c18f842044ae9a000175..d6b9f0584d49d4950939265658e44dfc547a2318 100644 (file)
                        }
                },
                "/api/v1/jobs/estimate": {
+                       "get": {
+                               "tags": ["jobs"],
+                               "summary": "Get estimate output",
+                               "description": "Get estimate output by output identifier",
+                               "responses": {
+                                       "200": {
+                                               "description": "Estimate output",
+                                               "content": {
+                                                       "application/json": {
+                                                               "schema": {
+                                                                       "type": "object",
+                                                                       "properties": {
+                                                                               "output": {
+                                                                                       "type": "array",
+                                                                                       "items": {
+                                                                                               "type": "string",
+                                                                                               "description": "Estimate output."
+                                                                                       }
+                                                                               },
+                                                                               "error": {
+                                                                                       "type": "integer",
+                                                                                       "description": "Error code",
+                                                                                       "enum": [0, 1, 1000]
+                                                                               }
+                                                                       }
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               },
+                               "parameters": [{
+                                       "name": "out_id",
+                                       "in": "query",
+                                       "description": "Output identifier acquired during estimate start.",
+                                       "required": true,
+                                       "schema": {
+                                               "type": "string",
+                                               "pattern": "[a-zA-Z0-9]+"
+                                       }
+                               }]
+                       },
                        "post": {
                                "tags": ["jobs"],
                                "summary": "Estimate job bytes and files",
                                                                                "output": {
                                                                                        "type": "array",
                                                                                        "items": {
-                                                                                               "description": "Output with estimated bytes and files",
-                                                                                               "type": "string"
+                                                                                               "type": "string",
+                                                                                               "description": "JSON string with output identifier"
                                                                                        }
                                                                                },
                                                                                "error": {