From: Marcin Haba Date: Fri, 3 May 2019 08:05:59 +0000 (+0200) Subject: baculum: Add status schedule endpoint to API documentation X-Git-Tag: Release-9.6.0~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db76989beed8e9f819c13dd7d9f87b1f06bc4e16;p=thirdparty%2Fbacula.git baculum: Add status schedule endpoint to API documentation --- diff --git a/gui/baculum/protected/API/openapi_baculum.json b/gui/baculum/protected/API/openapi_baculum.json index 4d09c54d0b..5fb6f977ab 100644 --- a/gui/baculum/protected/API/openapi_baculum.json +++ b/gui/baculum/protected/API/openapi_baculum.json @@ -89,6 +89,15 @@ }, "FileSet": { "$ref": "#/definitions/FileSet" + }, + "Schedules": { + "type": "array", + "items": { + "$ref": "#/definitions/Schedule" + } + }, + "Schedule": { + "$ref": "#/definitions/Schedule" } }, "parameters": { @@ -2498,6 +2507,96 @@ } } }, + "/api/v1/schedules/status": { + "get": { + "tags": ["schedules"], + "summary": "Schedule status", + "description": "Get Schedule status", + "responses": { + "200": { + "description": "List of Schedule status", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "output": { + "$ref": "#/components/schemas/Schedules" + }, + "error": { + "type": "integer", + "description": "Error code", + "enum": [0, 1, 4, 5, 6, 7, 11, 1000] + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "job", + "in": "query", + "required": false, + "description": "Job name", + "schema": { + "type": "string", + "pattern": "[a-zA-Z0-9:.-_ ]+" + } + }, + { + "name": "client", + "in": "query", + "required": false, + "description": "Client name", + "schema": { + "type": "string", + "pattern": "[a-zA-Z0-9:.-_ ]+" + } + }, + { + "name": "schedule", + "in": "query", + "required": false, + "description": "Schedule name", + "schema": { + "type": "string", + "pattern": "[a-zA-Z0-9:.-_ ]+" + } + }, + { + "name": "days", + "in": "query", + "required": false, + "description": "Days number to show schedule", + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Schedule results limit", + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "time", + "in": "query", + "required": false, + "description": "Schedule start time to show (YYYY-MM-DD HH:MM::SS)", + "schema": { + "type": "string" + } + } + ] + } + }, "/api/v1/bvfs/update": { "put": { "tags": ["bvfs"], @@ -4016,7 +4115,8 @@ }, "name": { "description": "Job name", - "type": "string" + "type": "string", + "pattern": "[a-zA-Z0-9:.-_ ]+" }, "type": { "description": "Job type", @@ -4522,6 +4622,53 @@ "type": "string" } } + }, + "Schedule": { + "type": "object", + "properties": { + "level": { + "description": "Job level letter", + "type": "string", + "enum": ["F","I", "D", "B", "f", "V", "C", "O", "d"] + }, + "type": { + "description": "Job type letter", + "type": "string", + "enum": ["B", "M", "V", "R", "I", "D", "A", "C", "c", "g"] + }, + "name": { + "description": "Job name", + "type": "string", + "pattern": "[a-zA-Z0-9:.-_ ]+" + }, + "client": { + "description": "Client name", + "type": "string", + "pattern": "[a-zA-Z0-9:.-_ ]+" + }, + "fileset": { + "description": "FileSet name", + "type": "string", + "pattern": "[a-zA-Z0-9:.-_ ]+" + }, + "schedtime_epoch": { + "description": "Scheduled time (UNIX timestamp format)", + "type": "string" + }, + "schedtime": { + "description": "Scheduled date in time (YYYY-MM-DD HH:M:SS)", + "type": "string" + }, + "priority": { + "description": "Job priority", + "type": "string" + }, + "schedule": { + "description": "Schedule name", + "type": "string", + "pattern": "[a-zA-Z0-9:.-_ ]+" + } + } } } }