The API endpoints listed below are available.
- Faster with redis
- Ratelimit on api with Gloabl IP ban
- Light Weight & Easy to setup
- Heroku Supported
- One command installation
docker-compose up -d
Create a shorter URL with Access Limits.
Parameters:
- url – [str] full url
- times - [str, int] short code will be dead after TIMES visit
curl -X POST \
--data '{"url": "https://google.com", "times": "3"}' \
-H "Content-Type: application/json" {{ domain }}/create/times
{"Auth":"7398e225-836e-4f60-9732-140cbf135e10","Code":"USTKUu","Created\
At":"1616766726.4898272","Fullurl":"https://google.com","Times":"3"}
Create a shorter URL with time.
Parameters:
- url – [str] full url
- time - [str, int] short code will be dead after TIME seconds
curl -X POST \
--data '{"url": "https://google.com", "time": "3"}' \
-H "Content-Type: application/json" {{ domain }}/create/time
{"Auth":"4f160d63-5ae2-4e28-a493-9c0e6b838768","Code":"vEXdWW","Created \
At":"1616767277.039384","Fullurl":"https://google.com","Ttl In Seconds":"3"}
Delete create url.
Parameters:
- code – [str] shorte code
- auth - [str] auth key of shorte code
curl -X DELETE \
--data '{"code": "C0uSZg", "auth": "e56e03bc-8d11-40f7-bcf6-f1254af053a6"}' \
-H "Content-Type: application/json" {{ domain }}/delete
HTTP Status 204 (No Content)
Check your URL stats.
Parameters:
- code – [str] shorte code
- auth - [str] auth key of shorte code
curl -X POST \
--data '{"code": "MK9qiH", "auth": "78afb120-6ab1-4f7f-a3ce-bce8e7a65693"}' \
-H "Content-Type: application/json" {{ domain }}/stats
{"Access":"1","Auth":"78afb120-6ab1-4f7f-a3ce-bce8e7a65693","Code":"MK9qiH","Created \
At":"1616767969.7141504","Fullurl":"https://google.com","Last Visit":"1616768016.03026","Times":"2"}
CODE MEANING
======================================================================================================
200 (OK) The request completed successfully.
204 (NO CONTENT) The request completed successfully but returned no content.
401 (UNAUTHORIZED) The Authorization header was missing or invalid.
403 (FORBIDDEN) The Authorization token you passed did not have permission to the resource.
404 (NOT FOUND) The resource at the location specified doesn't exist.
405 (METHOD NOT ALLOWED) The HTTP method used is not valid for the location specified.
429 (TOO MANY REQUESTS) You are being rate limited, see Rate Limits.
5xx (SERVER ERROR) The server had an error processing your request (these are rare).
CODE MEANING
==============================
5000 SUCCESS
5001 INVALID_DATA
5002 RATE_LIMIT
5003 NOT_FOUND
5004 INVALID_URL
5007 BLOCKED_IP
5008 INVALID_SHORT_CODE
5009 AUTH_FAILED