{"__v":43,"_id":"56130e2bd2b2370d0096b920","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"body":"The Stack API is a REST API, which defines a set of functions that allow developers to perform requests and to receive responses via the HTTP protocol. This API provides developers with the ability to control brightness, color temperature, motion settings, ambient light sensing settings, and other features to tailor Stack’s responsive lighting to one's unique preferences.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"OAuth 2.0\"\n}\n[/block]\nThe Stack API uses the [OAuth 2.0 protocol](http://oauth.net/2) and requires all requests to be made over SSL.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"JSON\"\n}\n[/block]\nThe Stack API supports commands and responses in JSON format.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Verbs\"\n}\n[/block]\nThe following HTTP verbs are used to manage the state of resources: GET, POST, PUT\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Status Codes\"\n}\n[/block]\n200:\tThe request has succeeded.\n201: Request fulfilled and resulted in a new resource being created.\n400:\tThe request could not be understood by the server due to malformed syntax.\n403:\tThe server understood the request, but is refusing to fulfill it.\n500:\tThe server encountered an unexpected condition which prevented it from fulfilling the request.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Base URL\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://api.stacklighting.com/v0\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Testing Endpoints\"\n}\n[/block]\nYou can test endpoints at the bottom of each page in the Reference section. For all endpoints other than OAuth 2.0, you'll need to select the key icon and enter your *access_token* as such:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Bearer YmE3MTU5MWItNTIwMC00MDc2LWJmZTQtZDU5YmUxMTA0ZTNmOjU3NjE2NzM5MzE1MjIwNDg= \",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Support\"\n}\n[/block]\nDon't hesitate to contact us with questions, feedback and feature requests at [developers:::at:::stacklighting.com](mailto:developers@stacklighting.com).","category":"56130e2bd2b2370d0096b91e","createdAt":"2015-10-05T23:56:27.962Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"56130e29d2b2370d0096b91a","slug":"getting-started","sync_unique":"","title":"Overview","type":"basic","updates":[],"user":"56130dcf8e503f0d00648b03","version":"56130e2ad2b2370d0096b91d","childrenPages":[]}
The Stack API is a REST API, which defines a set of functions that allow developers to perform requests and to receive responses via the HTTP protocol. This API provides developers with the ability to control brightness, color temperature, motion settings, ambient light sensing settings, and other features to tailor Stack’s responsive lighting to one's unique preferences. [block:api-header] { "type": "basic", "title": "OAuth 2.0" } [/block] The Stack API uses the [OAuth 2.0 protocol](http://oauth.net/2) and requires all requests to be made over SSL. [block:api-header] { "type": "basic", "title": "JSON" } [/block] The Stack API supports commands and responses in JSON format. [block:api-header] { "type": "basic", "title": "Verbs" } [/block] The following HTTP verbs are used to manage the state of resources: GET, POST, PUT [block:api-header] { "type": "basic", "title": "Status Codes" } [/block] 200: The request has succeeded. 201: Request fulfilled and resulted in a new resource being created. 400: The request could not be understood by the server due to malformed syntax. 403: The server understood the request, but is refusing to fulfill it. 500: The server encountered an unexpected condition which prevented it from fulfilling the request. [block:api-header] { "type": "basic", "title": "Base URL" } [/block] [block:code] { "codes": [ { "code": "https://api.stacklighting.com/v0", "language": "http" } ] } [/block] [block:api-header] { "type": "basic", "title": "Testing Endpoints" } [/block] You can test endpoints at the bottom of each page in the Reference section. For all endpoints other than OAuth 2.0, you'll need to select the key icon and enter your *access_token* as such: [block:code] { "codes": [ { "code": "Bearer YmE3MTU5MWItNTIwMC00MDc2LWJmZTQtZDU5YmUxMTA0ZTNmOjU3NjE2NzM5MzE1MjIwNDg= ", "language": "text" } ] } [/block] [block:api-header] { "type": "basic", "title": "Support" } [/block] Don't hesitate to contact us with questions, feedback and feature requests at [developers@stacklighting.com](mailto:developers@stacklighting.com).