articles-api/manifest.json

56 lines
1.2 KiB
JSON

{
"GET": {
"info": "redirects to given tiny url",
"scope": [[]],
"in": {
"URL#0": { "info": "tiny url to redirect to", "name": "url", "type": "varchar(1,30)" }
},
"out": {}
},
"POST": {
"info": "creates a new 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": {}
},
"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": {}
},
"/": {
"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)" }
}
}
}
}
}