Let's Shorten That URL

Bien que le nom pourrait faire penser à une école d'informatique, ce service est une initiative personnelle. Aucune école d'informatique ou autres n'a souffert dans l'expérience ni ne pourrait être responsable en aucune manière des urls qui circulent ici. Seule la personne qui utilise le service est responsable de l'url qu'elle raccourcit.

À certains moment, les urls raccourcies n'ayant jamais été accédées sont supprimées sans préavis.

Ce service n'est pas garanti.

© 2013 — 2024 Luc Didry — License: WTFPLAboutAPIStatisticsBrowser extensions

Lstu API

POST http://esi.link/a
Parameters:
  • lsturl mandatory
    URL to shorten
  • lsturl-custom optional
    Custom shortened text
  • format optional
    If equal to "json", response will be in JSON format, HTML format otherwise
Response:
  • JSON: success
    {"url":"https:\/\/fiat-tux.fr","short":"http:\/esi.link\/XzQBd6eFa","success":true}
  • JSON: failure
    {"msg":"Failure reason","success":false}
  • Response for HTML format
    You will be redirected to the Lstu classic interface with a message giving the shortened URL
GET http://esi.link/shortened_url
Response:
  • You will be redirected to the targeted URL or to the Lstu interface with a message giving the failure reason
GET http://esi.link/shortened_url.json
Response:
  • JSON: success
    {"url":"https:\/\/fiat-tux.fr","success":true}
  • JSON: failure
    {"msg":"Failure reason","success":false}
GET http://esi.link/stats

It will use Lstu's cookies to know which shortened URL it will return statistics for.

If you are logged in as admin ("adminpwd" or "hashed_adminpwd" setting), it will give you statistics for all URLs, sorted by the most visited first, paginated with pages containing 50 records.

Parameters:
  • page optional
    If you are logged in as admin, you can provide a "page" parameter
  • format optional
    If equal to "json", response will be in JSON format, HTML format otherwise
Response:
  • Response for JSON format
    [{"short":"http:\/esi.link\/shortened_url","url":"URL","counter":integer, how many unique visits of the shortened URL}]
  • Response for HTML format
    A page with a table containing the same informations that the JSON response
GET http://esi.link/stats/shortened_url

Get the details (visit counter, creation date, etc.) of a shortened URL.

Response:
  • JSON: success
    {"url":"https:\/\/fiat-tux.fr","short":"http:\/esi.link\/shortened_url","success":true,"counter":integer, how many unique visits of the shortened URL,"created_at":1519296674,"short":"URL","timestamp":1519296680}
  • JSON: failure
    {"msg":"Failure reason","success":false}
POST http://esi.link/stats
Parameters:
  • adminpwd
  • optional
    To do an admin login, set it to the password defined in the settings ("adminpwd" or "hashed_adminpwd")
  • action
  • optional
    To do an admin logout, set it to "logout".
  • format optional
    If equal to "json", response will be in JSON format, HTML format otherwise
Response:
  • If "adminpwd" is defined:
    • JSON: success
      {"msg":"You have been successfully logged in.","success":true}
    • JSON: failure
      {"msg":"Bad password","success":false}
    • Response for HTML format
      You will have the statistics page with the admin stats if you're succesfully logged in, or your stats and a failure message otherwise
  • If "action" is defined to "logout":
    Should always be successful

    • JSON: success
      {"msg":"You have been successfully logged out.","success":true}
    • Response for HTML format
      You will be redirected to Lstu statistics page
GET http://esi.link/d/shortened_url

You must be logged in as admin ("adminpwd" or "hashed_adminpwd" setting) to use it.

Parameters:
  • format optional
    If equal to "json", response will be in JSON format, HTML format otherwise
Response:
  • JSON: success
    {"url":"https:\/\/fiat-tux.fr","short":"http:\/esi.link\/shortened_url","success":true}
  • JSON: failure
    {"msg":"Failure reason","success":false}
  • Response for HTML format
    You will be redirected to Lstu statistics page with a message in case of failure