[IMPORTANT!] The API will be taken down 31st December 2023 [!IMPORTANT]
The API’s base URL is https://api.aawadia.dev
A frontend is available at https://web.aawadia.dev/
[NEW] IP API now live!
Date: 2023-08-02 14:10:43
When in a cloud environment most providers will provide some sort of internal metadata api that you can reach to get your own IP but sometimes you just want it on your own api for some reason or the other. It has come into my api now too.
There is one GET
endpoint at https://api.aawadia.dev/misc/v1/ip
- takes no body or any params
This will return the ‘real ip’ [CF-Connecting-IP] - as much as possible in the response along with the time
Example response
1 | { |
[NEW] Grammar Check API now live!
Date: 2023-07-28 11:43:23
One of the first software projects I worked on was taking a piece of text and ‘simplifying’ the words so that people who are not well versed in english can understand. Similarly, being able to fix grammar mistakes programatically has many applications. This API provides an HTTP interface to a grammar check model, simply stated you give it a sentence and it returns the mistakes it thinks you made
There is one POST
endpoint at https://api.aawadia.dev/lang-check/v1
The request should post a simple json body with a key text
that has the sentence to be verified an example is {"text": "There dogs are here."}
The response will be a list of checks of rules that it found matched [grammar rules violated are considered matches]
Example response
1 | { |
Object detection API now live!
Date: 2022-08-14 16:43:23
I have been studying machine learning for a while now and have been working on how I can bring model inferences to the JVM i.e. not have to use Python. This API provides an HTTP interface to an object detection model, simply stated you give it an image and it returns the classes [things in the image], the probability [accuracy], and the bounding boxes x and y coordinates.
There is one POST
endpoint at https://api.aawadia.dev/ml/v1/object-detect
The request should upload a file that is the image on which the analysis should run on. The max image size allowed is 5MB.
Example of a curl request that sends an image file from the local filesystem
1 | curl -v --request POST \ |
The response is the top 10 [up to 10] classes detected in the following format
1 | { |
SqlParser API now live!
Date: 2022-07-02 11:43:23
I am working on a project that requires parsing and processing sql queries. To evaluate a sql query first it needs to be parsed out - this api provides the ability to get the parsed query in json format
There is only one POST
endpoint at https://api.aawadia/dev/sql-parser/v1
Request should contain the sql query that should be parsed
1 | { |
The response is the json output of the parsed query
1 | { |
Morse code API now live!
Date: 2022-06-24 15:43:23
Morse code allows converting the given input to a sequence of dots and dashes.
The request takes in a single string input with key input
eg https://api.aawadia.dev/morse-code/v1?input=hello
, which will return the encoded version in the following format
1 | { |
Decoding is also available by sending the morse code as the input and another parameter type
with value decode
eg https://api.aawadia.dev/morse-code/v1?input=....%20.%20.-..%20.-..%20---&type=decode
Don’t forget to URL encode the spaces or pass it as json via the request body
This will return the original string in the following format
1 | { |
Geo and misc APIs now live!
Date: 2022-06-23 15:43:23
Namespaces
Two new namespaces were added to the api, misc
and geo
- misc is a dump of all misc utility type stuff and geo will have anything relating to geo location.
Misc
Misc received two new endpoints. One to generate heroku style names and one to get a random motivational statement, quote, or joke.
To get a random motivational statement, quote, or joke use https://api.aawadia.dev/misc/v1/daily
- specify the type using the query parameter ?type=motivation
- if not specified quote
is assumed by default
1 | { |
Haikunator is another useful endpoint - it generates heroku style names. https://api.aawadia.dev/misc/v1/haiku
1 | { |
Geo
Geo endpoints currently include the ability to work with OpenLocation Codes aka plus codes - 3 endpoints were added
- Encode
https://api.aawadia.dev/geo/v1/olc-encode?lat=20.3700625&long=2.7821875
Converts a lat and long pair to an OLC
1 | { |
- Decode
https://api.aawadia.dev/geo/v1/olc-decode?code=7FG49QCJ%2B2V
- don’t forget to url encode the+
Converts an OLC to Lat and Long data
1 | { |
- Meta
https://api.aawadia.dev/geo/v1/olc-meta?code=7FG49QCJ%2B2V
Provides some basic meta information about the OLC
1 | { |
Language detection API now live!
Date: 2022-06-18 18:49:11
The API provides a language detection service i.e. given a piece of text identify what language it is. Currently it supports over 80 languages. The longer the text that is provided the better the prediction. Unfortunately, due to the algorithm used English is poorly supported [ironically]
Server
The server is up now and should be alive at https://api.aawadia.dev/lang-detect/v1/
It takes in a single parameter via query parameters or json request body with key script
that should be the text of the language that needs to be detected eg https://api.aawadia.dev/lang-detect/v1?script=чтотыделаешь
The response is in the following format and includes the name of the language and the confidence, which is a float between 0 and 1.
1 | { |
Chronos API now live!
date: 2022-05-18 18:12:26
One of the most important and challenging aspect of a distributed database is the need to keep track of time. This provides some order to the writes, which can determine the sequence they are applied to the underlying storage. I just finished deploying a Chronos api that provides some sort of centralized clock service to allow for ordering.
NTP time is reasonably accurate but requires sending the request over datagram socket - Chronos provides an easy to use HTTP api that wraps the underlying NTP request
Server
The server is up now and should be alive at https://api.aawadia.dev/chronos/v1/time
, which will return the NTP time from Google’s server in the following format
1 | { |
Sending a query parameter ?simple=true
will return the server time directly in the following format
1 | { |
Sending a query parameter ?sequence=true
will return a monotonically increasing ULID [lexicographically sortable unique ID]
1 | { |
SLA
Best effort :)