{"swagger":"2.0","info":{"description":"Basic User/Tasks API\n","version":"1.0.0","title":"A6 Development in the Cloud","contact":{"email":"john.boyd@seattlecolleges.edu"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"basePath":"/jleeboyd/A6_API/1.0.0","tags":[{"name":"users","description":"List of users"},{"name":"tasks","description":"All tasks"}],"schemes":["https"],"paths":{"/users":{"post":{"tags":["users"],"summary":"Create user","description":"Create a user","operationId":"createUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Created user object","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"201":{"description":"successful user creation","schema":{"$ref":"#/definitions/User"}},"400":{"description":"bad request"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"429":{"description":"too many requests"},"500":{"description":"server error"},"502":{"description":"bad gateway"},"503":{"description":"service unavailable"}}},"get":{"tags":["users"],"summary":"Get all users","description":"Get list of all users","operationId":"getUsers","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Created user object","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"200":{"description":"success","schema":{"type":"array","items":{"$ref":"#/definitions/User"}}},"403":{"description":"forbidden"},"404":{"description":"not found"},"429":{"description":"too many requests"},"500":{"description":"server error"},"502":{"description":"bad gateway"},"503":{"description":"service unavailable"}}},"put":{"tags":["users"],"summary":"PUT not allowed","description":"Do not allow PUT requests for all users","operationId":"putUsers","responses":{"405":{"description":"method not allowed"}}},"delete":{"tags":["users"],"summary":"DELETE not allowed","description":"Do not allow DELETE requests for all users","operationId":"deleteUsers","responses":{"405":{"description":"method not allowed"}}}},"/users/{usersId}":{"post":{"tags":["users"],"summary":"POST by Id not allowed","operationId":"postUserById","description":"grab user document by Id","parameters":[{"name":"usersId","in":"path","description":"ID of user","required":true,"type":"integer","format":"int64"}],"responses":{"405":{"description":"method not allowed"}}},"get":{"tags":["users"],"summary":"Get specific user by Id","operationId":"getUserById","description":"grab user document by Id","consumes":["usersId"],"produces":["application/json"],"parameters":[{"in":"path","name":"usersId","description":"Id of user data that needs to be fetched","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"success","schema":{"$ref":"#/definitions/User"}},"403":{"description":"forbidden"},"404":{"description":"not found"},"429":{"description":"too many requests"},"500":{"description":"server error"},"502":{"description":"bad gateway"},"503":{"description":"service unavailable"}}},"put":{"tags":["users"],"summary":"Update user by Id","description":"This can only be done by the logged in user.","operationId":"putUserById","consumes":["usersId","application/json"],"parameters":[{"name":"usersId","in":"path","description":"Id of user to update","required":true,"type":"integer","format":"int64"}],"responses":{"201":{"description":"update success","schema":{"$ref":"#/definitions/User"}},"403":{"description":"forbidden"},"404":{"description":"not found"},"429":{"description":"too many requests"},"500":{"description":"server error"},"502":{"description":"bad gateway"},"503":{"description":"service unavailable"}}},"delete":{"tags":["users"],"summary":"Delete user by Id","description":"This can only be done by the logged in user.","operationId":"deleteUserById","consumes":["usersId"],"parameters":[{"name":"usersId","in":"path","description":"The Id of user that needs to be deleted","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"success"},"403":{"description":"forbidden"},"404":{"description":"not found"},"429":{"description":"too many requests"},"500":{"description":"server error"},"502":{"description":"bad gateway"},"503":{"description":"service unavailable"}}}},"/users/{usersId}/tasks":{"post":{"tags":["tasks"],"summary":"Create tasks for user","description":"Create task for a user by Id","operationId":"postAllTasksByUserId","consumes":["usersId","applicatin/json"],"parameters":[{"name":"usersId","in":"path","description":"The Id of the user","required":true,"type":"integer","format":"int64"}],"responses":{"201":{"description":"task created"},"400":{"description":"invalid syntax"},"403":{"description":"forbidden"},"429":{"description":"too many requests"},"500":{"description":"server error"},"502":{"description":"bad gateway"},"503":{"description":"service unavailable"}}},"get":{"tags":["tasks"],"summary":"Get list of all tasks for a user","description":"Fetch all tasks associated with a usersId","operationId":"getAllTasksByUserId","consumes":["usersId"],"produces":["application/JSON"],"parameters":[{"name":"usersId","in":"path","description":"The Id of the user","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"success","schema":{"type":"array","items":{"$ref":"#/definitions/Task"}}},"403":{"description":"forbidden"},"404":{"description":"not found"},"429":{"description":"too many requests"},"500":{"description":"server error"},"502":{"description":"bad gateway"},"503":{"description":"service unavailable"}}},"put":{"tags":["tasks"],"summary":"PUT all tasks by user Id not allowed","description":"update user tasks not allowed","operationId":"putAllTasksByUserId","parameters":[{"name":"usersId","in":"path","description":"The Id of the user","required":true,"type":"integer","format":"int64"}],"responses":{"405":{"description":"method not allowed"}}},"delete":{"tags":["tasks"],"summary":"DELETE all tasks by user Id not allowed","description":"delete user tasks not allowed","operationId":"deleteAllTasksByUserId","parameters":[{"name":"usersId","in":"path","description":"The Id of the user","required":true,"type":"integer","format":"int64"}],"responses":{"405":{"description":"method not allowed"}}}},"/users/{usersId}/tasks/{tasksId}":{"post":{"tags":["tasks"],"summary":"POST task by user Id and taskId not allowed","description":"create user tasks by Idnot allowed","operationId":"postTaskByUserId","parameters":[{"name":"usersId","in":"path","description":"The Id of the user","required":true,"type":"integer","format":"int64"},{"name":"tasksId","in":"path","description":"The Id of the task","required":true,"type":"integer","format":"int64"}],"responses":{"405":{"description":"method not allowed"}}},"get":{"tags":["tasks"],"summary":"Get specific task for userId with tasksId","description":"Fetch a task associated with a usersId and tasksId","operationId":"getTaskByUserIdTaskId","consumes":["usersId","tasksId"],"produces":["application/JSON"],"parameters":[{"name":"usersId","in":"path","description":"The Id of the user","required":true,"type":"integer","format":"int64"},{"name":"tasksId","in":"path","description":"The Id of the task","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"success","schema":{"$ref":"#/definitions/Task"}},"403":{"description":"forbidden"},"404":{"description":"not found"},"429":{"description":"too many requests"},"500":{"description":"server error"},"502":{"description":"bad gateway"},"503":{"description":"service unavailable"}}},"put":{"tags":["tasks"],"summary":"Update specific task for userId with tasksId","description":"Update a task associated with a usersId and tasksId","operationId":"updateTaskByUserIdTaskId","consumes":["usersId","tasksId","application/JSON"],"parameters":[{"name":"usersId","in":"path","description":"The Id of the user","required":true,"type":"integer","format":"int64"},{"name":"tasksId","in":"path","description":"The Id of the task","required":true,"type":"integer","format":"int64"}],"responses":{"201":{"description":"update success"},"403":{"description":"forbidden"},"404":{"description":"not found"},"429":{"description":"too many requests"},"500":{"description":"server error"},"502":{"description":"bad gateway"},"503":{"description":"service unavailable"}}},"delete":{"tags":["tasks"],"summary":"Delete specific task for userId with tasksId","description":"Delete a task associated with a usersId and tasksId","operationId":"deleteTaskByUserIdTaskId","consumes":["usersId","tasksId"],"parameters":[{"name":"usersId","in":"path","description":"The Id of the user","required":true,"type":"integer","format":"int64"},{"name":"tasksId","in":"path","description":"The Id of the task","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"success"},"403":{"description":"forbidden"},"404":{"description":"not found"},"429":{"description":"too many requests"},"500":{"description":"server error"},"502":{"description":"bad gateway"},"503":{"description":"service unavailable"}}}}},"definitions":{"User":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"}}},"Task":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["new","active","completed","closed"]},"userId":{"type":"integer","format":"int64"}}}},"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"},"host":"virtserver.swaggerhub.com"}