Quick note: when thinking of a user name, a password, and a key to store/retreive data, they can only effectively be 256 characters each (totalling 768 characters combined).
All create requests must be a POST request, with a post body as a form normally would create:
> curl -d 'foo=bar&baz=quux' https://datawamp.us/v1/api/username/password/test_key_1/
returns a 200 with a json response of true
when successful.
To update a post, simply post to the same url and it will overwrite the old data:
> curl -d 'bingo=bango&bongo=blargo' https://datawamp.us/v1/api/username/password/test_key_1/
returns a 200 with a json response of true
when successful.
There are two different get requests to make: getting an individual item, and getting a list of a user name/password combination's records. Let's start with a simple request to get an individual item:
> curl https://datawamp.us/v1/api/username/password/test_key_1/
yields a json response of: {"foo":"bar","baz":"quux"}
> curl https://datawamp.us/v1/api/username/password/
yields a json response of: {"test_key_1":{"foo":"bar","baz":"quux"}}
If there are more keys under the "username" and "password", they will be listed by key.
To delete a record, simply make a post request with an empty body (or with `null` in the body):
> curl -d '' https://datawamp.us/v1/api/username/password/test_key_1/
yields a json response of: "deleted"
Or alternatively, a post body with `null` should do the trick:
> curl -d 'null' https://datawamp.us/v1/api/username/password/test_key_1/
also yields a json response of: "deleted"
Feel free to hit me up with any bugs you find too!