particle-iot / spark-server

UNMAINTAINED - An API compatible open source server for interacting with devices speaking the spark-protocol
https://www.particle.io/
GNU Affero General Public License v3.0
441 stars 136 forks source link

Unable to Call function or variable via api. #41

Closed seanlim1 closed 9 years ago

seanlim1 commented 9 years ago

I dont quite understand what's going on here. My curl/api request is returning: 'Not Found' instead of json replies.

I used the following command in my cmd: curl http://[LOCAL IP:PORT]/v1/device/[SPARK ID]/[FUNCTION]?access_token=[TOKEN]

Over on the server end, it's getting : GET /v1/device/[SPARK ID]/[FUNCTION]?access_token=[TOKEN] HTTP/1.1" 404 9 "-" "curl/7.30.0"

Hope someone can enlighten me on what's going on. Thanks in advance!

dmiddlecamp commented 9 years ago

I think you want /v1/devices/ instead of /v1/device/, no?

seanlim1 commented 9 years ago

oh my goodness! Yes it is. Apologies for something soo trivial.

dmiddlecamp commented 9 years ago

no worries! Glad we could help! :)