jsonify.me

jsonify.me allows anyone to generate a personal JSON object with whatever information they want to share about themselves. The UI is minimal and all functionality is exposed through a basic API described below. It's mimimal by design and meant to be the foundation fo whatever people want to do with it. I use it as a programmatic way to expose data about me on my own domain - json.dangoldin.com.

The structure is entirely freeform but it would be cool to see a somewhat reasonable structure evolve as more and more people use it. If you have any ideas or want to build an add on let me know (you can find my email in my jsonify.me).

Note: If you want to use a custom domain, you'll need to create a CNAME record pointing your subdomain to domains.jsonify.me in addition to setting the subdomain to your account. For example, I have a CNAME record for json.dangoldin.com pointing to domains.jsonify.me.


The API

This API is still a work in progress so expect to see changes, hopefully non-breaking unless they're necessary. The underlying data shouldn't be affected though.


Registration

curl -H "Content-Type: application/json" -X POST -d '{"username": "your-username", "email" : "your-email", "password" : "your-password"}' "http://jsonify.me/register"
Successful response
{'success' : true, 'message': 'Successfully registered'}
Unsuccessful response
{'success': false, 'message': 'Error message'}

Authentication

curl -H "Content-Type: application/json" -X POST -d '{"username": "your-username", "email" : "your-email", "password" : "your-password"}' "http://jsonify.me/auth"
Successful response
{'success': true, 'token': 'Your secret token', 'message' : 'Successfully authenticated'}
Unsuccessful response
{'success': false, 'message': 'Not able to login'}

Setting your subdomain

curl -H "Content-Type: application/json" -H "Authorization: Bearer token-from-auth-call"  -X POST -d '{"username": "your-username", "subdomain" : "sub-domain-you-want-to-use" }' "http://jsonify.me/update"
Successful response
{'success': true, 'message': 'Account info has been updated'}
Unsuccessful response
{'success': false, 'message': 'Error message'}

Setting your info

curl -H "Content-Type: application/json" -H "Authorization: Bearer token-from-auth-call" -X POST -d 'json_object' "http://your-sub-domain/"
curl -H "Content-Type: application/json" -H "Authorization: Bearer token-from-auth-call" -X POST -d 'json_object' "http://username.jsonify.me/"
Successful response
{'success': true, 'message' : 'Data updated'}
Unsuccessful response
{'success': false, 'message': 'Error message'}

Getting your info

curl -L -H "Content-Type: application/json" -X GET "http://your-sub-domain"
curl -L -H "Content-Type: application/json" -X GET "http://username.jsonify.me/"
Successful response
{data from the POST call of "setting your info"}
Unsuccessful response
{'success': false, 'message': 'Error message'}

Examples

The purpose of these is to export your data from various sources and turn them into your own jsonify profile which will be hosted on {your username}.jsonify.me.