{ "openapi": "3.0.2", "info": { "title": "SpaceStatusAPI", "contact": { "name": "Peter Ludikovsky", "email": "peter@ludikovsky.name" }, "license": { "name": "CC-BY-SA 4.0", "url": "https://creativecommons.org/licenses/by-sa/4.0/" }, "version": "1.0" }, "servers": [ { "url": "https://api.usrspace.at/v1" } ], "paths": { "/spaceapi": { "get": { "summary": "Returns the current status as JSON suitable for SpaceAPI compatible software", "responses": { "200": { "description": "SpaceAPI compatible response", "content": { "application/json": { "schema": { "$ref": "https://raw.githubusercontent.com/SpaceApi/schema/master/13.json" } } } } } } }, "/access": { "get": { "summary": "Returns the current Open/Close status", "responses": { "200": { "description": "Current status", "content": { "application/json": { "schema": { "type": "object", "required": [ "isOpen" ], "properties": { "isOpen": { "type": "boolean", "description": "If the Space is open" }, "openSince": { "type": "string", "format": "date-time", "description": "Since when it's open, optional" }, "openTo": { "type": "string", "format": "date-time", "description": "Probable closing time, optional" }, "message": { "type": "string", "description": "An optional message, eg. reason for opening" } } }, "examples": { "closed": { "summary": "Closed Space", "value": { "isOpen": false } }, "open_end": { "summary": "Open End", "value": { "isOpen": true, "openSince": "2020-07-23T19:00:00+0200", "message": "Donnerstags-Stammtisch" } }, "open": { "summary": "Open & Closing time", "value": { "isOpen": true, "openSince": "2016-05-01T19:00:00+0200", "openTo": "2016-05-01T22:00:00+0200" } } } } } } } } }, "/access/open": { "post": { "description": "Open the Space", "parameters": [ { "name": "openTo", "description": "Time until closing again", "schema": { "type": "string", "format": "date-time" }, "in": "query", "example": "2020-07-23T22:00:00+0200" }, { "name": "message", "description": "An optional message, eg. reason for opening", "schema": { "type": "string" }, "in": "query", "example": "Donnerstags-Stammtisch" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "409": { "description": "Already open" } } }, "patch": { "description": "Change the current session", "parameters": [ { "name": "openTo", "description": "Time until closing again", "schema": { "type": "string", "format": "date-time" }, "in": "query", "example": "2020-07-23T22:00:00+0200" }, { "name": "message", "description": "An optional message, eg. reason for opening", "schema": { "type": "string" }, "in": "query", "example": "Donnerstags-Stammtisch" } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "404": { "description": "Space currently closed" } } } }, "/access/close": { "get": { "description": "Close the Space", "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "409": { "description": "Already closed" } } } } } }