{
	"info": {
		"_postman_id": "10a74262-4c03-43a9-b2c2-9d3e174eded1",
		"name": "Watergate Sonic WiFi local API",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "7923055"
	},
	"item": [
		{
			"name": "v1",
			"item": [
				{
					"name": "/api/sonic",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"host": true,
							"user-agent": true,
							"accept": true,
							"accept-encoding": true,
							"connection": true
						}
					},
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/vnd.wtg.local.device-state.v1+json",
								"description": "Required to get device state v1",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/valve",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"connection": true,
							"accept-encoding": true,
							"accept": true,
							"user-agent": true,
							"host": true
						}
					},
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/valve",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"valve"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/valve",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"content-type": true,
							"connection": true,
							"accept-encoding": true,
							"accept": true,
							"host": true,
							"user-agent": true
						}
					},
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/vnd.wtg.local.valve-change.v1+json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": "Processed as application/vnd.wtg.local.valve-change.v1+json",
								"type": "text",
								"disabled": true
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\"state\":\"{{VALVE_STATE}}\"}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/valve",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"valve"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/telemetry",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"host": true,
							"user-agent": true,
							"accept": true,
							"accept-encoding": true,
							"connection": true
						}
					},
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/telemetry",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"telemetry"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/power",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"host": true,
							"user-agent": true,
							"accept": true,
							"accept-encoding": true,
							"connection": true
						}
					},
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/power",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"power"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/networking",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"host": true,
							"user-agent": true,
							"accept": true,
							"accept-encoding": true,
							"connection": true
						}
					},
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/networking",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"networking"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/networking",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"content-type": true,
							"connection": true,
							"accept-encoding": true,
							"accept": true,
							"host": true,
							"user-agent": true
						}
					},
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/vnd.wtg.local.network-change.v1+json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": "Processed as application/vnd.wtg.local.network-change.v1+json",
								"type": "text",
								"disabled": true
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\"ssid\":\"{{WIFI_AP_SSID}}\",\"password\":\"{{WIFI_AP_PASS}}\"}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/networking",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"networking"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/auto-shut-off",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"host": true,
							"user-agent": true,
							"accept": true,
							"accept-encoding": true,
							"connection": true
						}
					},
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/auto-shut-off",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"auto-shut-off"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/auto-shut-off/report",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"connection": true,
							"accept-encoding": true,
							"accept": true,
							"user-agent": true,
							"host": true
						}
					},
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/auto-shut-off/report",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"auto-shut-off",
								"report"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/command",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"content-type": true,
							"connection": true,
							"accept-encoding": true,
							"accept": true,
							"host": true,
							"user-agent": true
						}
					},
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/vnd.wtg.local.command.v1+json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": "Processed as application/vnd.wtg.local.command.v1+json",
								"type": "text",
								"disabled": true
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\"type\":\"{{COMMAND_TYPE}}\"}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/command",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"command"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/webhook",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"connection": true,
							"accept-encoding": true,
							"user-agent": true,
							"accept": true,
							"host": true
						}
					},
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/webhook",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"webhook"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/webhook",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"content-type": true,
							"connection": true,
							"accept-encoding": true,
							"accept": true,
							"host": true,
							"user-agent": true
						}
					},
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/vnd.wtg.local.webhook.v1+json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": "Processed as application/vnd.wtg.local.webhook.v1+json",
								"type": "text",
								"disabled": true
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\"url\":\"{{WEBHOOK_ADDRESS}}\"}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/webhook",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"webhook"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/webhook",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"content-type": true,
							"connection": true,
							"accept-encoding": true,
							"accept": true,
							"host": true,
							"user-agent": true
						}
					},
					"request": {
						"method": "DELETE",
						"header": [],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/webhook",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"webhook"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/buzzer",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"connection": true,
							"accept-encoding": true,
							"user-agent": true,
							"accept": true,
							"host": true
						}
					},
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/buzzer",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"buzzer"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/buzzer/sounds",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"connection": true,
							"accept-encoding": true,
							"user-agent": true,
							"accept": true,
							"host": true
						}
					},
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/buzzer/sounds",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"buzzer",
								"sounds"
							]
						}
					},
					"response": []
				},
				{
					"name": "/api/sonic/buzzer",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"content-type": true,
							"connection": true,
							"accept-encoding": true,
							"accept": true,
							"host": true,
							"user-agent": true
						}
					},
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/vnd.wtg.local.buzzer-control.v1+json",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"description": "Processed as application/vnd.wtg.local.webhook.v1+json",
								"type": "text",
								"disabled": true
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"action\": \"{{BUZZER_ACTION}}\",\n    \"name\":\"{{SOUND_NAME}}\",\n    \"interval\": {{SOUND_INTERVAL}},\n    \"times\": {{SOUND_REPEAT}}\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic/buzzer",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic",
								"buzzer"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "v2",
			"item": [
				{
					"name": "/api/sonic",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"host": true,
							"user-agent": true,
							"accept-encoding": true,
							"connection": true,
							"accept": true
						}
					},
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/vnd.wtg.local.device-state.v2+json",
								"description": "Request without ACCEPT header, will be processed as v2 as well",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "v3",
			"item": [
				{
					"name": "/api/sonic",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"host": true,
							"user-agent": true,
							"accept-encoding": true,
							"connection": true,
							"accept": true
						}
					},
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/vnd.wtg.local.device-state.v3+json",
								"description": "Request without ACCEPT header, will be processed as v2 as well",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/json",
								"description": "Processed as application/vnd.wtg.local.device-state.v2+json",
								"type": "text",
								"disabled": true
							}
						],
						"url": {
							"raw": "{{SONIC_ADDRESS}}/api/sonic",
							"host": [
								"{{SONIC_ADDRESS}}"
							],
							"path": [
								"api",
								"sonic"
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"requests": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"requests": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "SONIC_IP_ADDRESS",
			"value": "192.168.77.33"
		},
		{
			"key": "SONIC_ADDRESS",
			"value": "http://{{SONIC_IP_ADDRESS}}"
		},
		{
			"key": "VALVE_STATE",
			"value": "open"
		},
		{
			"key": "VALVE_STATE",
			"value": "close",
			"disabled": true
		},
		{
			"key": "WIFI_AP_SSID",
			"value": "test-ssid"
		},
		{
			"key": "WIFI_AP_PASS",
			"value": "test-password"
		},
		{
			"key": "COMMAND_TYPE",
			"value": "reboot"
		},
		{
			"key": "WEBHOOK_ADDRESS",
			"value": ""
		},
		{
			"key": "WEBHOOK_ADDRESS",
			"value": "http://192.168.77.112:8080/webhook",
			"disabled": true
		},
		{
			"key": "BUZZER_ACTION",
			"value": "",
			"disabled": true
		},
		{
			"key": "BUZZER_ACTION",
			"value": ""
		},
		{
			"key": "SOUND_NAME",
			"value": ""
		},
		{
			"key": "SOUND_INTERVAL",
			"value": ""
		},
		{
			"key": "SOUND_REPEAT",
			"value": ""
		}
	]
}