articles-api/api.json

55 lines
1.2 KiB
JSON
Raw Normal View History

{
"GET": {
2018-06-16 16:04:28 +00:00
"info": "redirects to given tiny url",
"scope": [[]],
2018-06-16 16:04:28 +00:00
"in": {
"URL#0": { "info": "tiny url to redirect to", "name": "url", "type": "string(1,30)" }
2018-06-16 16:04:28 +00:00
},
"out": {}
},
2018-06-16 16:04:28 +00:00
"POST": {
"info": "creates a new tiny url",
"scope": [["admin"]],
2018-06-16 16:04:28 +00:00
"in": {
"URL#0": { "info": "preferred tiny url", "type": "string(1,30)", "name": "url" },
"target": { "info": "url to shorten", "type": "string(5,300)" }
2018-06-16 16:04:28 +00:00
},
"out": {}
},
"PUT": {
"info": "overrides an existing tiny url",
"scope": [["admin"]],
"in": {
"URL#0": { "info": "preferred tiny url", "type": "string(1,30)", "name": "url" },
"target": { "info": "url to shorten", "type": "string(5,300)" }
},
"out": {}
},
"DELETE": {
"info": "removes an existing tiny url",
"scope": [["admin"]],
"in": {
"URL#0": { "info": "preferred tiny url", "type": "string(1,30)", "name": "url" }
},
"out": {}
},
"/": {
"token": {
"POST": {
"info": "creates a 5-minute access token",
"scope": [[]],
"in": {
"URL#0": { "info": "wanted role", "type": "string(3,10)", "name": "role" }
},
"out": {
"token": { "info": "access token", "type": "string(128,128)" }
}
}
}
}
2018-06-16 16:04:28 +00:00
}