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 Sep 14, 2010
·
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
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)