Authentication

Starling API works on javascript web-tokens. The default validity for the tokens is 1 year. It will be changed to shorter duration soon.

Base URL for all requests: http://starling.exploreembedded.com

Obtaining the token

http verb Request Response Description
POST /api/authenticate token Pass email and password as body parameter to obtain a web token

Example with CURL

  1. curl -X POST -F "email=your@email.com" -F "password=password" \
  2. 'http://starling.exploreembedded.com/api/authenticate'
  1. {"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXUyJ9.eyJzdWIiOiIyIiwiaXNzIjoiaHR0c
  2. DpcL1wvc3RhcmxpbmcuZXhwbG9yZWVtYmVkasdfdsfNvbVwvYXBpXC9hdXRoZW50.
  3. iwiZXhwIjoiMTQsdfeaeSEFEA0NiIsIm5iZiI6IjE0NTE1NjMwNDYiLCJqdGkiOiI4asdfew}

Curl Response

example with postman
  1. [
  2. {
  3. "id": "4",
  4. "user_id": "2",
  5. "name": "EE unit 4",
  6. "product_id": "STAR0004",
  7. "location": "",
  8. "configuration":{
  9. "lines":"2" ,
  10. "brightness":"100",
  11. "current_message":"hello world",
  12. "scroll_speed":"6",
  13. "font":"arial"
  14. },
  15. "created_at": "2015-12-28 14:27:07",
  16. "updated_at": "2015-12-28 14:27:07"
  17. }
  18. ]