{
	"info": {
		"_postman_id": "41220256-3610-4082-973a-6af502bb2d76",
		"name": "Oklyn API",
		"description": "API pour utiliser les données collectées par Oklyn, et pour piloter la filtration.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Lire les mesures",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "https://api.oklyn.fr/public/v1/device/{{device_id}}/data/ph",
					"protocol": "https",
					"host": [
						"api",
						"oklyn",
						"fr"
					],
					"path": [
						"public",
						"v1",
						"device",
						"{{device_id}}",
						"data",
						"ph"
					]
				},
				"description": "Le paramètre en fin d'URL peut être modifié pour: \"air\" (Température de l'air), \"water\" (Température de l'eau), \"ph\" ou \"orp\" (RedOx)"
			},
			"response": []
		},
		{
			"name": "Lire l'état de la pompe",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "https://api.oklyn.fr/public/v1/device/{{device_id}}/pump",
					"protocol": "https",
					"host": [
						"api",
						"oklyn",
						"fr"
					],
					"path": [
						"public",
						"v1",
						"device",
						"{{device_id}}",
						"pump"
					]
				}
			},
			"response": []
		},
		{
			"name": "Lire l'état du contact Aux",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "https://api.oklyn.fr/public/v1/device/{{device_id}}/aux",
					"protocol": "https",
					"host": [
						"api",
						"oklyn",
						"fr"
					],
					"path": [
						"public",
						"v1",
						"device",
						"{{device_id}}",
						"aux"
					]
				}
			},
			"response": []
		},
		{
			"name": "Modifier le contact Aux",
			"request": {
				"method": "PUT",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n  \"aux\": \"off\"\n}"
				},
				"url": {
					"raw": "https://api.oklyn.fr/public/v1/device/{{device_id}}/aux",
					"protocol": "https",
					"host": [
						"api",
						"oklyn",
						"fr"
					],
					"path": [
						"public",
						"v1",
						"device",
						"{{device_id}}",
						"aux"
					]
				}
			},
			"response": []
		},
		{
			"name": "Modifier la filtration",
			"request": {
				"method": "PUT",
				"header": [
					{
						"key": "Content-Type",
						"type": "text",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n  \"pump\": \"auto\"\n}"
				},
				"url": {
					"raw": "https://api.oklyn.fr/public/v1/device/{{device_id}}/pump",
					"protocol": "https",
					"host": [
						"api",
						"oklyn",
						"fr"
					],
					"path": [
						"public",
						"v1",
						"device",
						"{{device_id}}",
						"pump"
					]
				}
			},
			"response": []
		}
	],
	"auth": {
		"type": "apikey",
		"apikey": [
			{
				"key": "value",
				"value": "{{cle_api}}",
				"type": "string"
			},
			{
				"key": "key",
				"value": "X-Api-Token",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"id": "a333c6dc-375c-49da-9549-653552cc3737",
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"id": "81bc410d-f3b9-49a8-9dfe-e72fa44b5021",
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"id": "ad5e183c-5049-4868-baf1-8ac12b596156",
			"key": "cle_api",
			"value": "8/DwmRA3NdKUPZ/WYfAMSE1FZb0=",
			"type": "string"
		},
		{
			"id": "b041a352-fbba-482f-86e3-99727491dd7b",
			"key": "device_id",
			"value": "my",
			"type": "string"
		}
	],
	"protocolProfileBehavior": {}
}