Links

GET https://demo.getlynx.dev/api/link

Retrieves the destination of link by its slug (unauthed).

Query Parameters

NameTypeDescription

slug*

String

The slug of the link

{
    "success": true,
    "result": {
        "destination": "https://github.com/Lynx-Shortener/Docs",
    }
}

GET https://demo.getlynx.dev/api/link

Retrieves the full link information by its slug.

Query Parameters

NameTypeDescription

id*

String

The slug of the link

Headers

NameTypeDescription

Authorization

String

Your API key

Cookies

NameTypeDescription

token

String

Your JWT Session

{
    "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
    }
}

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

NameTypeDescription

pagesize*

String

Items to return in a page, up to 100.

page*

String

The current page to return, 0-base indexed.

sortType*

Intege

Order to sort by. -1 or 1.

sortField*

String

Field to sort by. id, slug, destination, author, creationDate, modifiedDate or visits.

search

String

Value to search slug and destination by.

Headers

NameTypeDescription

Authorization

String

Your API key

Cookies

NameTypeDescription

token

String

Your JWT Session

{
    "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"
            }
        ]
    }
}

POST https://demo.getlynx.dev/api/link

Creates a a link.

Headers

NameTypeDescription

Authorization

String

Your API key

Cookies

NameTypeDescription

token

String

Your JWT Session

Request Body

NameTypeDescription

slug*

string

The slug of the new link

destination*

string

The destination of the new link

{
    "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"
    }
}

PATCH https://demo.getlynx.dev/api/link

Updates a a link.

Headers

NameTypeDescription

Authorization

String

Your API key

Cookies

NameTypeDescription

token

String

Your JWT Session

Request Body

NameTypeDescription

slug*

string

The slug of the link to set

destination*

string

The destination of the link to set

id*

String

The id of the link

{
    "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"
    }
}

DELETE https://demo.getlynx.dev/api/link

Deletes a a link.

Headers

NameTypeDescription

Authorization

String

Your API key

Cookies

NameTypeDescription

token

String

Your JWT Session

Request Body

NameTypeDescription

ids*

Array

The id of links to remove

{
    "success": true
}

Last updated