This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
REST API: Methods
pakerfeldt edited this page Jan 4, 2011
·
4 revisions
Description: Turns the specified device on
URL: GET /devices/<id>/on.<format>
Formats: xml
Requires Authentication: Yes*
Specific Error States:
- 400 (HTTP) 210 (ERROR) if the
id
is malformed. - 400 (HTTP) 220 (ERROR) if the method is not supported.
- 400 (HTTP) 300 (ERROR) if libtelldus-core returns an error.
Usage Examples:
curl -u user:pass http://localhost:8080/devices/1/on.xml
(empty response)
Description: Turns the specified device off
URL: GET /devices/<id>/off.<format>
Formats: xml
Requires Authentication: Yes*
Specific Error States:
- 400 (HTTP) 210 (ERROR) if the
id
is malformed. - 400 (HTTP) 220 (ERROR) if the method is not supported.
- 400 (HTTP) 300 (ERROR) if libtelldus-core returns an error.
Usage Examples:
curl -u user:pass http://localhost:8080/devices/1/off.xml
(empty response)
Description: Dims the specified device to the specified level (0 – 255)
URL: GET /devices/<id>/dim/<level>.<format>
Formats: xml
Requires Authentication: Yes*
Specific Error States:
- 400 (HTTP) 210 (ERROR) if
id
orlevel
is malformed. - 400 (HTTP) 220 (ERROR) if the method is not supported.
- 400 (HTTP) 300 (ERROR) if libtelldus-core returns an error.
Usage Examples:
curl -u user:pass http://localhost:8080/devices/1/dim/42.xml
(empty response)
Description: Triggers learn on the specified device.
URL: GET /devices/<id>/learn.<format>
Formats: xml
Requires Authentication: Yes*
Specific Error States:
- 400 (HTTP) 210 (ERROR) if
id
is malformed. - 400 (HTTP) 220 (ERROR) if the method is not supported.
- 400 (HTTP) 300 (ERROR) if libtelldus-core returns an error.
Usage Examples:
curl -u user:pass http://localhost:8080/devices/1/learn.xml
(empty response)