Link Retrieval
Get link destination by slug
GET
https://demo.getlynx.dev/api/link
Retrieves the destination of link by its slug (unauthed).
Query Parameters
{
"success": true,
"result": {
"destination": "https://github.com/Lynx-Shortener/Docs",
}
}
Get full link by slug
GET
https://demo.getlynx.dev/api/link
Retrieves the full link information by its slug.
Query Parameters
Cookies
{
"success": true,
"result": {
"id": "6023f6ec-4283-4ece-a4de-5acbb30357d9",
"slug": "qKK0AR34",
"destination": "https://github.com/Lynx-Shortener/Docs",
"author": "be8881ce-af01-433b-a675-fe02e8a48a88",
"creationDate": "2023-05-26T13:21:31.803Z",
"modifiedDate": "2023-05-26T13:21:31.803Z",
"visits": 0
}
}
Retrieve paginated links
GET
https://demo.getlynx.dev/api/link/list
Retrieve a list of paginated links that the user has permission to see. An admin can see all links but a standard user can only see their own.
Query Parameters
Cookies
{
"success": true,
"result": {
"remaining": 0,
"links": [
{
"id": "f03eb6f5-d9ce-42ab-9506-f0e438304308",
"slug": "author",
"destination": "https://jackbailey.dev",
"author": "be8881ce-af01-433b-a675-fe02e8a48a88",
"creationDate": "2023-05-26T13:47:54.168Z",
"modifiedDate": "2023-05-26T13:47:54.168Z",
"visits": 0,
"account": "demo"
},
{
"id": "2fabe8c4-374e-458f-b8ad-9ef72badb2b3",
"slug": "website",
"destination": "https://getlynx.dev",
"author": "be8881ce-af01-433b-a675-fe02e8a48a88",
"creationDate": "2023-05-26T13:47:32.752Z",
"modifiedDate": "2023-05-26T13:47:40.649Z",
"visits": 1,
"account": "demo"
},
{
"id": "e845ff19-c3c3-4cd0-8e54-f932809a3126",
"slug": "website-source",
"destination": "https://github.com/Lynx-Shortener/Website",
"author": "be8881ce-af01-433b-a675-fe02e8a48a88",
"creationDate": "2023-05-26T13:47:23.016Z",
"modifiedDate": "2023-05-26T13:47:23.016Z",
"visits": 0,
"account": "demo"
}
]
}
}
Link Management
Create link
POST
https://demo.getlynx.dev/api/link
Creates a a link.
Cookies
Request Body
{
"success": true,
"result": {
"id": "6023f6ec-4283-4ece-a4de-5acbb30357d9",
"slug": "qKK0AR34",
"destination": "https://github.com/Lynx-Shortener/Docs",
"author": "be8881ce-af01-433b-a675-fe02e8a48a88",
"creationDate": "2023-05-26T13:21:31.803Z",
"modifiedDate": "2023-05-26T13:21:31.803Z",
"visits": 0,
"account": "demo"
}
}
Destination conflict only occurs when URL_ONLY_UNIQUE is set
Update link
PATCH
https://demo.getlynx.dev/api/link
Updates a a link.
Cookies
Request Body
{
"success": true,
"result": {
"id": "6023f6ec-4283-4ece-a4de-5acbb30357d9",
"slug": "qKK0AR34",
"destination": "https://github.com/Lynx-Shortener/Website",
"author": "be8881ce-af01-433b-a675-fe02e8a48a88",
"creationDate": "2023-05-26T13:21:31.803Z",
"modifiedDate": "2023-05-26T13:28:21.642Z",
"visits": 0,
"account": "demo"
}
}
Destination conflict only occurs when URL_ONLY_UNIQUE is set
Delete link
DELETE
https://demo.getlynx.dev/api/link
Deletes a a link.
Cookies
Request Body