{
	"info": {
		"_postman_id": "150af912-7eee-48cb-99b2-f11b454c2901",
		"name": "NightDriverStrip endpoints",
		"description": "Call configurations to use/test some of the endpoints in the NightDriverStrip on-device API - basically those not yet covered by the web UI. These have been confirmed to work with the Mesmerizer board/project and the Spectrum project on the M5StickC Plus.\n\nNotes:\n\n- Before using the call configurations in this collection, make sure to update the value of the \"device_ip\" variable in the Variables tab of this collection. Make sure to Save the collection after doing this, because otherwise your change will not be applied.\n- The parameters for POST call configurations are listed in the Body tab of the respective configurations. As with the collection's \"device_ip\" variable, Save a configuration if you want to persist changes to its parameters.\n- By default, all parameters for all configurations are unchecked, which means nothing will be sent unless at least one parameter is checked.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "26965397"
	},
	"item": [
		{
			"name": "Get effects list",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "{{device_ip}}/effects",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"effects"
					]
				},
				"description": "Retrieve basic information about the NightDriverStrip effects on the device."
			},
			"response": []
		},
		{
			"name": "Get device config specs",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "{{device_ip}}/settings/specs",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"settings",
						"specs"
					]
				},
				"description": "Retrieve specifications for device-wide settings used by NightDriverStrip effects."
			},
			"response": []
		},
		{
			"name": "Get device config",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "{{device_ip}}/settings",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"settings"
					]
				},
				"description": "Retrieve device settings used by NightDriverStrip effects."
			},
			"response": []
		},
		{
			"name": "Set device config",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "effectInterval",
							"value": "60000",
							"type": "text",
							"disabled": true
						},
						{
							"key": "hostname",
							"value": "NightDriverStrip",
							"type": "text",
							"disabled": true
						},
						{
							"key": "location",
							"value": "Utrecht",
							"type": "text",
							"disabled": true
						},
						{
							"key": "locationIsZip",
							"value": "false",
							"type": "text",
							"disabled": true
						},
						{
							"key": "countryCode",
							"value": "nl",
							"type": "text",
							"disabled": true
						},
						{
							"key": "openWeatherApiKey",
							"value": "<your-API-key>",
							"type": "text",
							"disabled": true
						},
						{
							"key": "timeZone",
							"value": "Europe/Amsterdam",
							"type": "text",
							"disabled": true
						},
						{
							"key": "use24HourClock",
							"value": "1",
							"type": "text",
							"disabled": true
						},
						{
							"key": "useCelsius",
							"value": "true",
							"type": "text",
							"disabled": true
						},
						{
							"key": "youtubeChannelGuid",
							"value": "9558daa1-eae8-482f-8066-17fa787bc0e4",
							"type": "text",
							"disabled": true
						},
						{
							"key": "youtubeChannelName1",
							"value": "Daves Garage",
							"type": "text",
							"disabled": true
						},
						{
							"key": "nonsense",
							"value": "gobbledygook",
							"description": "Included to test if irrelevant parameters are correctly ignored",
							"type": "text",
							"disabled": true
						},
						{
							"key": "ntpServer",
							"value": "0.pool.ntp.org",
							"type": "text",
							"disabled": true
						},
						{
							"key": "rememberCurrentEffect",
							"value": "true",
							"type": "text",
							"disabled": true
						},
						{
							"key": "brightness",
							"value": "255",
							"type": "text",
							"disabled": true
						},
						{
							"key": "powerLimit",
							"value": "5000",
							"type": "text",
							"disabled": true
						}
					]
				},
				"url": {
					"raw": "{{device_ip}}/settings",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"settings"
					]
				},
				"description": "Change device settings used by NightDriverStrip effects.\n\nNotes:\n\n- Only parameters that are sent are actually changed.\n- All parameters are optional.\n- The call will return the current setting values, after those included in the call have been applied."
			},
			"response": []
		},
		{
			"name": "Set device config with validation",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "location",
							"value": "Utrecht",
							"type": "text",
							"disabled": true
						},
						{
							"key": "locationIsZip",
							"value": "false",
							"type": "text",
							"disabled": true
						},
						{
							"key": "countryCode",
							"value": "nl",
							"type": "text",
							"disabled": true
						},
						{
							"key": "openWeatherApiKey",
							"value": "<your-API-key>",
							"type": "text",
							"disabled": true
						},
						{
							"key": "nonsense",
							"value": "gobbledygook",
							"description": "Included to test if irrelevant parameters are correctly ignored",
							"type": "text",
							"disabled": true
						},
						{
							"key": "powerLimit",
							"value": "1500",
							"type": "text",
							"disabled": true
						}
					]
				},
				"url": {
					"raw": "{{device_ip}}/settings/validated",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"settings",
						"validated"
					]
				},
				"description": "Validates and changes exactly one known setting. The new setting value is only applied if validation succeeds.\n\nNotes:\n\n- Providing more than one known setting (i.e. sending more than one known parameter) is an error.\n- If a validation error occurs, the call will return a message indicating the nature of the problem.\n- Validation is not implemented for all settings. The validation step is skipped for settings for which no validation is available."
			},
			"response": []
		},
		{
			"name": "Get effect config specs",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "{{device_ip}}/settings/effect/specs?effectIndex=7",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"settings",
						"effect",
						"specs"
					],
					"query": [
						{
							"key": "effectIndex",
							"value": "7",
							"description": "Index of the effect to retrieve effect setting specs for"
						}
					]
				},
				"description": "Retrieve the specifications for settings that are available for a specific effect."
			},
			"response": []
		},
		{
			"name": "Get effect config",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "{{device_ip}}/settings/effect?effectIndex=7",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"settings",
						"effect"
					],
					"query": [
						{
							"key": "effectIndex",
							"value": "7",
							"description": "Index of the effect to retrieve effect settings for"
						}
					]
				},
				"description": "Retrieve the effect-specific settings for one effect."
			},
			"response": []
		},
		{
			"name": "Set effect config",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "effectIndex",
							"value": "7",
							"description": "Index of the effect to set effect settings for",
							"type": "text"
						},
						{
							"key": "friendlyName",
							"value": "Subscribers",
							"type": "text",
							"disabled": true
						},
						{
							"key": "maximumEffectTime",
							"value": "30000",
							"type": "text",
							"disabled": true
						},
						{
							"key": "clearMaximumEffectTime",
							"value": "true",
							"type": "text",
							"disabled": true
						},
						{
							"key": "youtubeChannelGuid",
							"value": "9558daa1-eae8-482f-8066-17fa787bc0e4",
							"type": "text",
							"disabled": true
						},
						{
							"key": "youtubeChannelName",
							"value": "Daves Garage",
							"type": "text",
							"disabled": true
						},
						{
							"key": "nonsense",
							"value": "gobbledygook",
							"description": "Included to test if irrelevant parameters are correctly ignored",
							"type": "text",
							"disabled": true
						}
					]
				},
				"url": {
					"raw": "{{device_ip}}/settings/effect",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"settings",
						"effect"
					]
				},
				"description": "Change effect-specific settings for one effect.\n\nNotes:\n\n- Only parameters that are sent are actually changed.\n- All parameters are optional.\n- The call will return the current setting values for the effect, after those included in the call have been applied."
			},
			"response": []
		},
		{
			"name": "Copy effect",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "effectIndex",
							"value": "0",
							"type": "text"
						},
						{
							"key": "friendlyName",
							"value": "Spectrum Copy",
							"type": "text"
						},
						{
							"key": "maximumEffectTime",
							"value": "30000",
							"type": "text",
							"disabled": true
						}
					]
				},
				"url": {
					"raw": "{{device_ip}}/copyEffect",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"copyEffect"
					]
				},
				"description": "Creates a copy of an effect in the effect list and adds it to the end of the list. The new effect's settings can be set/modified in the same call."
			},
			"response": []
		},
		{
			"name": "Move effect",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "effectIndex",
							"value": "7",
							"type": "text"
						},
						{
							"key": "newIndex",
							"value": "2",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{device_ip}}/moveEffect",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"moveEffect"
					]
				},
				"description": "Moves an effect to another place in the effect list."
			},
			"response": []
		},
		{
			"name": "Delete effect",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "effectIndex",
							"value": "0",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{device_ip}}/deleteEffect",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"deleteEffect"
					]
				},
				"description": "Deletes an effect from the effect list. Only effects that are not part of the default set can be deleted."
			},
			"response": []
		},
		{
			"name": "Reset config and/or device",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "effectsConfig",
							"value": "true",
							"type": "text",
							"disabled": true
						},
						{
							"key": "deviceConfig",
							"value": "1",
							"type": "text",
							"disabled": true
						},
						{
							"key": "board",
							"value": "true",
							"type": "text",
							"disabled": true
						}
					]
				},
				"url": {
					"raw": "{{device_ip}}/reset",
					"host": [
						"{{device_ip}}"
					],
					"path": [
						"reset"
					]
				},
				"description": "Reset the device settings, effect configuration information, and/or the device (i.e. restart it).\n\nThe parameters included in the call with a value representing a boolean \"true\" indicate which reset(s) should be applied. Absent parameters are considered to be \"false\"."
			},
			"response": []
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "device_ip",
			"value": "192.168.1.1"
		}
	]
}