SimpleShortener Docs

If you just wish to add links, and not automate things, see the panel.

Authentication

All requests require username and a password header. These should match some of the credentials in the configuration file. You also need a Content-Type header set to application/json

Errors

For an error response, the server will return a JSON with a single key- error, which has a short message describing the error. On a 2xx error code, the key is instead message.

Get existing links

To get the existing links, make a GET request to /simpleshortener_admin_api/list. This returns a JSON file with the links field having a key:value list of shortening:destination.

Add new link

You can add new links by making a PUT request to /simpleshortener_admin_api/add with the JSON data

{
    "link": "shorturl", 
    "destination": "https://example.com"
}

Delete link

You can delete links by making a DELETE request to /simpleshortener_admin_api/delete with the JSON data

{
    "link": "shorturl"
}

Edit existing link

You can edit existing links by making a PATCH request to /simpleshortener_admin_api/edit with the JSON data

{
    "link": "shorturl", 
    "destination": "https://example.com"
}