2018-06-10 20:49:32 +00:00
|
|
|
{
|
|
|
|
"GET": {
|
2018-06-16 16:04:28 +00:00
|
|
|
"info": "redirects to given tiny url",
|
2018-06-10 20:49:32 +00:00
|
|
|
"scope": [[]],
|
2018-06-16 16:04:28 +00:00
|
|
|
"in": {
|
2018-06-16 20:08:14 +00:00
|
|
|
"URL#0": { "info": "tiny url to redirect to", "name": "url", "type": "varchar(1,30)" }
|
2018-06-16 16:04:28 +00:00
|
|
|
},
|
|
|
|
"out": {}
|
2018-06-10 20:49:32 +00:00
|
|
|
},
|
|
|
|
|
2018-06-16 16:04:28 +00:00
|
|
|
"POST": {
|
|
|
|
"info": "creates a new tiny url",
|
|
|
|
"scope": [[]],
|
|
|
|
"in": {
|
2018-06-16 20:08:14 +00:00
|
|
|
"URL#0": { "info": "preferred tiny url", "type": "varchar(1,30)", "name": "url" },
|
2018-06-16 16:04:28 +00:00
|
|
|
"target": { "info": "url to shorten", "type": "varchar(5,300)" }
|
|
|
|
},
|
|
|
|
"out": {}
|
2018-06-16 20:08:14 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
"PUT": {
|
|
|
|
"info": "overrides an existing tiny url",
|
|
|
|
"scope": [[]],
|
|
|
|
"in": {
|
|
|
|
"URL#0": { "info": "preferred tiny url", "type": "varchar(1,30)", "name": "url" },
|
|
|
|
"target": { "info": "url to shorten", "type": "varchar(5,300)" }
|
|
|
|
},
|
|
|
|
"out": {}
|
|
|
|
},
|
|
|
|
|
|
|
|
"DELETE": {
|
|
|
|
"info": "removes an existing tiny url",
|
|
|
|
"scope": [[]],
|
|
|
|
"in": {
|
|
|
|
"URL#0": { "info": "preferred tiny url", "type": "varchar(1,30)", "name": "url" }
|
|
|
|
},
|
|
|
|
"out": {}
|
2018-06-17 19:24:47 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
"/": {
|
|
|
|
"auth": {
|
|
|
|
"POST": {
|
|
|
|
"info": "returns a 1-minute access token",
|
|
|
|
"scope": [[]],
|
|
|
|
"in": {
|
|
|
|
"username": { "info": "user name", "type": "varchar(3,20)" },
|
|
|
|
"password": { "info": "password", "type": "varchar(5,150)" }
|
|
|
|
},
|
|
|
|
"out": {
|
|
|
|
"token": { "info": "access token", "type": "varchar(256,256)" }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-06-10 20:49:32 +00:00
|
|
|
}
|
2018-06-16 16:04:28 +00:00
|
|
|
|
2018-06-10 20:49:32 +00:00
|
|
|
}
|