capabilities

Enumerates the currently defined capabilities. The response, and object the keys of which are the capability names, may be quite large depending on system configuration.

Each value in the object is itself an object:

{
    "power_switch": {
        "attributes": {
            "state": {
                "type": "bool",
                "values": {
                    "true": "on",
                    "false": "off"
                }
            }
        },
        "actions": {
            "on": {},
            "off": {},
            "set": {
                "arguments": {
                    "state": {
                        "type": "boolean"
                    }
                }
            }
        }
    },
    "dimming": {
        "attributes": {
            "level": {
                "type": "real",
                "min": 0,
                "max": 1
            },
            "step": {
                "type": "real",
                "min": 0,
                "max": 1,
                "default": 0.1
            }
        },
        "actions": {
            "set": {
                "arguments": {
                    "level": {
                        "type": "real",
                        "min": 0,
                        "max": 1
                    }
                }
            },
            "up": {},
            "down": {}
        }
    },
    "toggle": {
        "actions": {
            "toggle": {}
        }
    },
    ...etc...
}

The attributes is an object containing the definition of the dynamic data available to the entity for the capability. The actions is an object containing the definition of each action defined by the capability.

capability/:id

Fetches the detail for the single capability named in id. Returns a single capability object as defined by capabilities above.

Example: curl -o - 'http://host-ip:8111/api/v1/capability/dimming'

{
    "attributes": {
        "level": {
            "type": "real",
            "min": 0,
            "max": 1
        },
        "step": {
            "type": "real",
            "min": 0,
            "max": 1,
            "default": 0.1
        }
    },
    "actions": {
        "set": {
            "arguments": {
                "level": {
                    "type": "real",
                    "min": 0,
                    "max": 1
                }
            }
        },
        "up": {},
        "down": {}
    }
}