### Doc of the API ###

### examples
http://dev.enchant.com/api/v1
http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#useful-post-responses

## Get Capabilities ###

curl -v http://localhost:8081/v1/capabilities/

*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8081 (#0)
> GET /v1/capabilities HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:8081
> Accept: */*
> 
< HTTP/1.1 200 OK
< Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
< Access-Control-Allow-Origin: *
< Cache-Control: no-store, no-cache, must-revalidate, max-age=0
< Connection: close
< Content-Type: application/json; charset=utf-8
< Pragma: no-cache
< 
{
   "capabilities" : [ "Light", "Shutter", "Sprinkler" ],
   "id" : "/v1/capabilities",
   "response_code" : 200,
   "status" : "OK"
}

## Get Capabilities ###

curl -v http://localhost:8081/v1/capabilities/Lights/

## Set Capabilities Light ###

curl -v -X POST http://localhost:8081/v1/capabilities/Lights -d "{\"id\": 1, \"state\":true}"


curl -v -X POST http://localhost:8081/v1/capabilities/Lights/1 -d "{"state"=true}"