{ "apiVersion": "0.0.1", "swaggerVersion": "1.2", "basePath": "http://api.dotdeploy.works", "resourcePath": "/token", "produces": ["application/json"], "apis": [ { "path": "/token", "operations": [ { "method": "GET", "summary": "Get all tokens for the user which corresponds with the provided accesstoken", "type": "array", "items": { "$ref": "Token" }, "nickname": "findTokens", "authorizations": {}, "parameters": [ { "name": "accesstoken", "description": "Token provided from authentication with Google OAuth", "required": "true", "type": "string", "paramType": "query" } ], "responseMessages": [ { "code": 500, "message": "This is temporary and likely means your accesstoken is invalid." } ] }, { "method": "POST", "summary": "Create a new token for the user which corresponds with the provided accesstoken", "type": "void", "nickname": "createNewToken", "authorizations": {}, "parameters": [ { "name": "accesstoken", "description": "Token provided from authentication with Google OAuth", "required": "true", "type": "string", "paramType": "query" }, { "name": "newToken", "description": "New token which should be associated with the user", "required": "true", "type": "Token", "paramType": "body" } ] }, { "method": "DELETE", "summary": "Delete a token based on the provided token-id", "type": "void", "nickname": "deleteToken", "authorizations": {}, "parameters": [ { "name": "accesstoken", "description": "Token provided from authentication with Google OAuth", "required": "true", "type": "string", "paramType": "query" }, { "name": "token-id", "description": "token-id of the token which should be deleted", "required": "true", "type": "string", "paramType": "query" } ] } ] } ], "models": { "Token": { "id": "Token", "required": [ "token-id", "created-on" ], "properties": { "token-id": { "type": "string" }, "created-on": { "type": "dateTime" }, "uses": { "type": "int", "description": "The number of times this token can be used before being invalid" }, "expires-on": { "type": "dateTime", "description": "The date and time when this token will no longer be valid" }, "description": { "type": "string" } } } } }