Difference between revisions of "Starling API"
Line 1: | Line 1: | ||
=Authentication= | =Authentication= | ||
− | ==Request== | + | Starling API works on javascript web-tokens. The default validity for the tokens is 1 year. It will be changed to shorter duration soon. |
+ | |||
+ | ==Obtaining the token == | ||
+ | ===Request=== | ||
<syntaxhighlight> | <syntaxhighlight> | ||
POST /api/authenticate HTTP/1.1 | POST /api/authenticate HTTP/1.1 | ||
Line 8: | Line 11: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ==Response== | + | ===Response=== |
Revision as of 16:53, 31 December 2015
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.
Obtaining the token
Request
- POST /api/authenticate HTTP/1.1
- Host: starling.exploreembedded.com
- description: If email and password are sent in the post body,
- the API returns a token as below
Response
- [
- {
- "id": "4",
- "user_id": "2",
- "name": "EE unit 4",
- "product_id": "STAR0004",
- "location": "",
- "configuration":{
- "lines":"2" ,
- "brightness":"100",
- "current_message":"hello world",
- "scroll_speed":"6",
- "font":"arial"
- },
- "created_at": "2015-12-28 14:27:07",
- "updated_at": "2015-12-28 14:27:07"
- }
- ]