0

I am using the url at the developer-api.nest.com site, and my request is re-directed to the firebase-apiserver01...01.dapi.production.nest.com

I get the correct structured data back, using this dos command: curl -v -k -L -X GET "https://developer-api.nest.com/structures/Za6hCZpmt4g6mBTaaA96yuY87lzLtsucYjbxW_b_thAuJJ7oUOelKA/?auth=c.om2...AeiE"

I get the error 'Invalid content sent' when I send this PATCH curl -v -k -L -X PATCH "https://developer-api.nest.com/structures/Za6hCZpmt4g6mBTaaA96yuY87lzLtsucYjbxW_b_thAuJJ7oUOelKA/?auth=c.om2...AeiE" -H "Content-Type: application/json" -d '{"away":"home"}'

I have tried adding '.json' before the question mark, but get the same error.

1 Answers1

1

To set the structure to home/away you'll need to send a PUT request for example as follows:

curl -v -L -X PUT "https://developer-api.nest.com/structures/g-9y-2xkHpBh1MGkVaqXOGJiKOB9MkoW1hhYyQk2vAunCK8a731jbg?auth=<AUTH_TOKEN>" -H "Content-Type: application/json" -d '{"away":"home"}'

Hope that helps

--Nagesh

Nagesh Susarla
  • 1,660
  • 10
  • 10
  • Without the '-k' as in your example, I get 'SSL certificate problem: self signed certificate in certificate chain'. With the '-k' added, I get 'upload completely sent off: 13 out of 13 bytes HTTP/1.1 400 Bad Request...{"error":"Invalid content sent"}* Connection to #1 firebase-apiserver01-tah01-iad01.dapi.production.nest.com left intact – Kim Gregory Jul 30 '14 at 15:43
  • curl --version? I'm at curl 7.30.0 – Nagesh Susarla Aug 01 '14 at 18:30