-
Notifications
You must be signed in to change notification settings - Fork 2
Api
Intrpt edited this page May 29, 2024
·
13 revisions
POST /games/
name type data type description title required string Title of the uploaded game
Request body is a file
http code content-type response header response body 201text/plain;charset=UTF-8content-location: /games/{uuid}400application/json{"message":"{reason}"}401application/json{"message":"Invalid token"}405application/json{"message":"Method not allowed"}409application/json{"message":"Game is already existing"}500application/json{"message":"{reason}"}504application/json{"message":"Kubernetes Control Server not reachable"}
curl --location 'http://localhost:8080/games/?title=FirstUpload' \ --form 'file=@"/C:/Users/Kai/Downloads/Alwa'\''s Awakening (Demo).nes"''
GET /games/
name type data type description
http code content-type response header response body 200application/json"games:"[{"id": "5f31ba81-d41c-4b9c-ab1c-c90ceb07e5a3","title": "Mock1","status": "installed","url": "https://localhost:4200"},{"id": "92db29ed-54bb-4f40-aa03-2edca26974c6","title": "Mock2","status": "installed","url": "https://localhost:4200"}]401application/json{"message":"Invalid token"}405text/html;charset=utf-8{"message":"Method not allowed"}500application/json{"message":"Internal Server Error"}504application/json{"message":"Kubernetes Control Server not reachable"}
curl --location 'http://localhost:8080/games/'
GET /games/{id}/
name type data type description id required string uuid of the game
http code content-type response header response body 200application/json{"id": "5abbf73d-f1bd-4fa5-8c38-5348a23ed465","title": "Mock","status": "installed","url": "https://localhost:4200"}401application/json{"message":"Invalid token"}403application/json{"message":"You don't have permission to access this resource"}405application/json{"message":"Method not allowed"}404application/json{"message":"Game not found"}500application/json{"message":"{reason}"}504application/json{"message":"Kubernetes Control Server not reachable"}
curl --location 'http://localhost:8080/games/5abbf73d-f1bd-4fa5-8c38-5348a23ed465'
DELETE /games/{id}/
name type data type description id required string uuid of the game
http code content-type response header response body 204text/html;charset=utf-8401application/json{"message":"Invalid token"}405application/json{"message":"Method not allowed"}404application/json{"message":"Game not found"}500application/json{"message":"{reason}"}504application/json{"message":"Kubernetes Control Server not reachable"}
curl --location --request DELETE 'http://localhost:8080/games/5abbf73d-f1bd-4fa5-8c38-5348a23ed465'