Created
May 17, 2019 16:34
-
-
Save p-sun/9a0d7e04b1db04e332bc53240564cb70 to your computer and use it in GitHub Desktop.
Hue Lights API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "359b945e-bf05-4aeb-b440-cb6b89183085", | |
"name": "Hue Lights API", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "Local - Debug", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "{{bridgeAddress}}/debug/clip.html", | |
"host": [ | |
"{{bridgeAddress}}" | |
], | |
"path": [ | |
"debug", | |
"clip.html" | |
], | |
"query": [ | |
{ | |
"key": "", | |
"value": "", | |
"disabled": true | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Local - New Developer", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\"devicetype\":\"my_hue_app#iphone paige\"}\n" | |
}, | |
"url": { | |
"raw": "{{bridgeAddress}}/api/", | |
"host": [ | |
"{{bridgeAddress}}" | |
], | |
"path": [ | |
"api", | |
"" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Get All Lights", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "{{bridgeAddress}}/api/{{username}}/lights/", | |
"host": [ | |
"{{bridgeAddress}}" | |
], | |
"path": [ | |
"api", | |
"{{username}}", | |
"lights", | |
"" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Get Light By ID", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "{{bridgeAddress}}/api/{{username}}/lights/1", | |
"host": [ | |
"{{bridgeAddress}}" | |
], | |
"path": [ | |
"api", | |
"{{username}}", | |
"lights", | |
"1" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Set Light State By ID. Set light 1 to AQUA", | |
"request": { | |
"method": "PUT", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\"on\":true,\n\"bri\": 254,\n\"hue\": 38433,\n\"sat\": 237}\n\n\n" | |
}, | |
"url": { | |
"raw": "{{bridgeAddress}}/api/{{username}}/lights/1/state", | |
"host": [ | |
"{{bridgeAddress}}" | |
], | |
"path": [ | |
"api", | |
"{{username}}", | |
"lights", | |
"1", | |
"state" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Set Light State By ID. Set light 2 to PINK with transition time.", | |
"request": { | |
"method": "PUT", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"type": "text", | |
"value": "application/json" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n\t\"xy\": [0.5014,0.0],\n\t\"transitiontime\": 20\n}\n" | |
}, | |
"url": { | |
"raw": "{{bridgeAddress}}/api/{{username}}/lights/2/state", | |
"host": [ | |
"{{bridgeAddress}}" | |
], | |
"path": [ | |
"api", | |
"{{username}}", | |
"lights", | |
"2", | |
"state" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Set Light State By ID Flash", | |
"request": { | |
"method": "PUT", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\"alert\": \"select\"}\n" | |
}, | |
"url": { | |
"raw": "{{bridgeAddress}}/api/{{username}}/lights/2/state", | |
"host": [ | |
"{{bridgeAddress}}" | |
], | |
"path": [ | |
"api", | |
"{{username}}", | |
"lights", | |
"2", | |
"state" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Set Light State By ID Strobe", | |
"request": { | |
"method": "PUT", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"type": "text", | |
"value": "application/json" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\"alert\": \"lselect\"}\n" | |
}, | |
"url": { | |
"raw": "{{bridgeAddress}}/api/{{username}}/lights/2/state", | |
"host": [ | |
"{{bridgeAddress}}" | |
], | |
"path": [ | |
"api", | |
"{{username}}", | |
"lights", | |
"2", | |
"state" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Remote Auth - GET Access Token", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "http://www.meethue.com/en-US/api/gettoken?devicename=iPhone+5&appid=hueapp&deviceid=001788FFFE6BC491", | |
"protocol": "http", | |
"host": [ | |
"www", | |
"meethue", | |
"com" | |
], | |
"path": [ | |
"en-US", | |
"api", | |
"gettoken" | |
], | |
"query": [ | |
{ | |
"key": "devicename", | |
"value": "iPhone+5" | |
}, | |
{ | |
"key": "appid", | |
"value": "hueapp" | |
}, | |
{ | |
"key": "deviceid", | |
"value": "001788FFFE6BC491" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Remote Auth - GET Code (Paste in browser)", | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"type": "text", | |
"value": "application/json" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "https://api.meethue.com/oauth2/auth?clientid=vfaZuDD2UXwvmo4lp7jsonLxBDPmAUGO&appid=alexaworldcup&deviceid=alexaWorldCupDevice&state=anyString1&response_type=code", | |
"protocol": "https", | |
"host": [ | |
"api", | |
"meethue", | |
"com" | |
], | |
"path": [ | |
"oauth2", | |
"auth" | |
], | |
"query": [ | |
{ | |
"key": "clientid", | |
"value": "vfaZuDD2UXwvmo4lp7jsonLxBDPmAUGO" | |
}, | |
{ | |
"key": "appid", | |
"value": "alexaworldcup" | |
}, | |
{ | |
"key": "deviceid", | |
"value": "alexaWorldCupDevice" | |
}, | |
{ | |
"key": "devicename", | |
"value": "paigeDevice", | |
"disabled": true | |
}, | |
{ | |
"key": "state", | |
"value": "anyString1" | |
}, | |
{ | |
"key": "response_type", | |
"value": "code" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Remote Auth - POST Token Basic Auth (need code from previous call)", | |
"request": { | |
"auth": { | |
"type": "basic", | |
"basic": [ | |
{ | |
"key": "password", | |
"value": "VKpC6vv40IwnN7sZ", | |
"type": "string" | |
}, | |
{ | |
"key": "username", | |
"value": "vfaZuDD2UXwvmo4lp7jsonLxBDPmAUGO", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "POST", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "https://api.meethue.com/oauth2/token?code={{code}}&grant_type=authorization_code", | |
"protocol": "https", | |
"host": [ | |
"api", | |
"meethue", | |
"com" | |
], | |
"path": [ | |
"oauth2", | |
"token" | |
], | |
"query": [ | |
{ | |
"key": "code", | |
"value": "{{code}}" | |
}, | |
{ | |
"key": "grant_type", | |
"value": "authorization_code" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Remote Auth - PUT Start Link", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "gP5xwZthk71nO2O3sZWmO6H8LxAz", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "PUT", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{ \"linkbutton\": true }\n" | |
}, | |
"url": { | |
"raw": "https://api.meethue.com/bridge/0/config", | |
"protocol": "https", | |
"host": [ | |
"api", | |
"meethue", | |
"com" | |
], | |
"path": [ | |
"bridge", | |
"0", | |
"config" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Remote Auth - POST Create Username", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "gP5xwZthk71nO2O3sZWmO6H8LxAz", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"type": "text", | |
"value": "application/json" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{ \"devicetype\": \"AlexaWorldCup\" }\n" | |
}, | |
"url": { | |
"raw": "https://api.meethue.com/bridge/", | |
"protocol": "https", | |
"host": [ | |
"api", | |
"meethue", | |
"com" | |
], | |
"path": [ | |
"bridge", | |
"" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Remote - Get All Lights", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "gP5xwZthk71nO2O3sZWmO6H8LxAz", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "https://api.meethue.com/bridge/{{usernameRemote}}/lights", | |
"protocol": "https", | |
"host": [ | |
"api", | |
"meethue", | |
"com" | |
], | |
"path": [ | |
"bridge", | |
"{{usernameRemote}}", | |
"lights" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Remote - Set Light State by ID. Set light 2 to YELLOW.", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "gP5xwZthk71nO2O3sZWmO6H8LxAz", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "PUT", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n\t\"xy\": [0.4255,0.508],\n\t\"transitiontime\": 10\n}\n" | |
}, | |
"url": { | |
"raw": "https://api.meethue.com/bridge/{{usernameRemote}}/lights/2/state", | |
"protocol": "https", | |
"host": [ | |
"api", | |
"meethue", | |
"com" | |
], | |
"path": [ | |
"bridge", | |
"{{usernameRemote}}", | |
"lights", | |
"2", | |
"state" | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment