Skip to content

Latest commit

 

History

History
254 lines (161 loc) · 3.29 KB

paths.md

File metadata and controls

254 lines (161 loc) · 3.29 KB

Resources

Links-controller

Links Controller

deleteLink

DELETE /link/delete/{link}
Parameters
Type Name Description Schema
Path link
required
link string
Responses
HTTP Code Description Schema
200 OK No Content
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
Produces
  • \*/*
Example HTTP request
Request path
/link/delete/string

redirect

GET /link/redirect/{link}
Parameters
Type Name Description Schema
Path link
required
link string
Query id
required
id integer (int64)
Responses
HTTP Code Description Schema
200 OK No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
Produces
  • \*/*
Example HTTP request
Request path
/link/redirect/string?id=0

registerLink

POST /link/register
Parameters
Type Name Description Schema
Body linkRegistrationRequest
required
linkRegistrationRequest LinkRegistrationRequest
Responses
HTTP Code Description Schema
200 OK string
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
Consumes
  • application/json
Produces
  • \*/*
Example HTTP request
Request path
/link/register
Request body
{
  "expirationTimeInDays" : 0,
  "fullLink" : "string",
  "user_id" : 0
}
Example HTTP response
Response 200
"string"

loadStatsTopN

GET /link/stats/all
Parameters
Type Name Description Schema
Body count
optional
count integer (int32)
Responses
HTTP Code Description Schema
200 OK < Stats > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
Produces
  • \*/*
Example HTTP request
Request path
/link/stats/all
Request body
{ }
Example HTTP response
Response 200
[ {
  "count" : 0,
  "short_link" : "string"
} ]

loadStatsUniqueTopN

GET /link/stats/unique
Parameters
Type Name Description Schema
Body count
optional
count integer (int32)
Responses
HTTP Code Description Schema
200 OK < Stats > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
Produces
  • \*/*
Example HTTP request
Request path
/link/stats/unique
Request body
{ }
Example HTTP response
Response 200
[ {
  "count" : 0,
  "short_link" : "string"
} ]