The Simple API - Just call it

Key Value

A serverless key-value database backed by DynamoDB

1. Set a value

Send a POST request to this endpoint with text body:
https://keyvalue.thesimpleapi.com/:secret/:key
  • :secret You are free to use any string match this regex: /[A-Za-z0-9]{32,128}/. This is also your "password", choose wisely and don't expose it to public or others can use it to read/write your data.
  • :key Any string less than 512 chars.
  • Body of the request must be a string less than 200,000 chars. If you need to store objects, use JSON string or any kind of serialization with string output.

Demo: here I use "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" as key, but you probably need to generate a universal-unique-hard-to-guess key. Remember, if I know your key I can read/write your data. Check the API bellow.

Request: (you can replace with your own params)
POST https://keyvalue.thesimpleapi.com/
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
:secret
/
user_1
:key

Body:
{"id":1,"name":"Trung"}
Body


Response:
(Press "Send" to see response)

2. Get a value

Just send a GET request to the same endpoint. Response status 404 means key not found, status 200 mean success with the value in body.

Request: (you can replace with your own params)
GET https://keyvalue.thesimpleapi.com/
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
:secret
/
user_1
:key

Response:
(Press "Send" to see response)

3. Delete a value

Similarly, send a DELETE request to the same endpoint.

Request: (you can replace with your own params)
DELETE https://keyvalue.thesimpleapi.com/
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
:secret
/
user_1
:key

Response:
(Press "Send" to see response)

4. Behind the scenes

  • AWS DynamoDB
  • AWS Lambda
  • Cloudfront
  • Route 53
  • NodeJS

5. Limitations

  • Speed is not a feature, each request will likely to take about 300ms up to 3 seconds for the response to be returned.
  • Eventually Consistent Reads: when you "get", the response might not reflect the results of a recently completed "set" operation.
  • You have free 1000 requests for each :secret. Check X-KeyValue-Limit in response headers to see your remaining requests. Contact me if you need more.

6. What can you do with this?

  • Probably to speedup your hackathon projects.
  • Portable free database for pet projects

7. Licences

Free for all of your hobby projects. Contact me if you need more.