API documentation

Endpoint Discovery

Nutshell offers a specialized API at api.nutshell.com which your application must use to find the API endpoint for each user.

  • JSON-RPC endpoint: http://api.nutshell.com/v1/json

This API has one method, getApiForUsername. It accepts one parameter, username: the user that wishes to log in.

The API will respond with an array of domains which the user can login to.

"result": {
    "iphone": "app01.nutshell.com", 
    "api": "app01.nutshell.com", 
    "login": "app01.nutshell.com"
}

Your application should cache this response for the next 10 - 90 minutes.

Try it out!

Building the Endpoint URL

Once your application has the domain name the user should login to, building the rest of the endpoint URL is simple.

The domain should be prefixed with https:// (the Nutshell API requires HTTPS). After the domain name comes the API version, in the format api/vX. api/v1 is currently the only valid version of the Nutshell API. Finally, /json should be appended to the URL, noting that the protocol is JSON-RPC.

Continuing from the example given above, one might end up with the API endpoint URL https://app01.nutshell.com/api/v1/json.