Unable to delete program through API
Anyone else having problems deleting program through API 4.6.0?
/program/id/delete
I tried curl and a few other direct methods, but none appear to delete programs. IOS and browser apps have no issues.
HD-12 Firmware version, 4.0.954, Web UI Version 1.8, Hardware revision 3 |
curl -X POST -k https://192.168.1.65:8080/api/4/program/8/delete?access_token=872c6bbd6daabb3209824fe99982226af85ea01d93875587305f54ab
response:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>411 - Length Required</title>
</head>
<body>
<h1>411 - Length Required</h1>
</body>
</html>
-
Solved. The response should have been a clue. You need to include a "Content-Length: 0" The following curls works
curl -X POST -d "" -k https://192.168.1.65:8080/api/4/program/3/delete?access_token=872c6bbd6daabb3209824fe99982226af85ea01d93875587305f54ab
Please sign in to leave a comment.
Comments
1 comment