{"openapi":"3.1.0","info":{"title":"Apizie","version":"2.0.0","description":"One API key, one envelope, many public data sources."},"servers":[{"url":"https://apizie.tech"}],"security":[{"ApiKeyAuth":[]}],"paths":{"/v1/iot:netatmo/addwebhook":{"get":{"operationId":"iot_netatmo_addwebhook","summary":"Links a callback url to a user.","description":"GET /addwebhook","tags":["iot"],"parameters":[{"name":"url","in":"query","required":true,"description":"Your webhook callback url","schema":{"type":"string","description":"Your webhook callback url"}},{"name":"app_type","in":"query","required":true,"description":"Webhooks are only available for Welcome, enter app_camera.","schema":{"type":"string","description":"Webhooks are only available for Welcome, enter app_camera."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/createnewschedule":{"post":{"operationId":"iot_netatmo_createnewschedule","summary":"The method createnewschedule creates a new schedule stored in the backup list.","description":"POST /createnewschedule","tags":["iot"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["device_id","module_id"],"properties":{"device_id":{"type":"string","description":"The relay id"},"module_id":{"type":"string","description":"The thermostat id"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/iot:netatmo/dropwebhook":{"get":{"operationId":"iot_netatmo_dropwebhook","summary":"Dissociates a webhook from a user.","description":"GET /dropwebhook","tags":["iot"],"parameters":[{"name":"app_type","in":"query","required":true,"description":"For Welcome, use app_camera","schema":{"type":"string","description":"For Welcome, use app_camera"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/getcamerapicture":{"get":{"operationId":"iot_netatmo_getcamerapicture","summary":"Returns the snapshot associated to an event.","description":"GET /getcamerapicture","tags":["iot"],"parameters":[{"name":"image_id","in":"query","required":true,"description":"id of the image (can be retrieved as 'id' in 'face' in Gethomedata, or as 'id' in 'snapshot' in Getnextevents, Getlasteventof and…","schema":{"type":"string","description":"id of the image (can be retrieved as 'id' in 'face' in Gethomedata, or as 'id' in 'snapshot' in Getnextevents, Getlasteventof and…"}},{"name":"key","in":"query","required":true,"description":"Security key to access snapshots.","schema":{"type":"string","description":"Security key to access snapshots."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/geteventsuntil":{"get":{"operationId":"iot_netatmo_geteventsuntil","summary":"Returns the snapshot associated to an event.","description":"GET /geteventsuntil","tags":["iot"],"parameters":[{"name":"home_id","in":"query","required":true,"description":"ID of the Home you're interested in","schema":{"type":"string","description":"ID of the Home you're interested in"}},{"name":"event_id","in":"query","required":true,"description":"Your request will retrieve all the events until this one","schema":{"type":"string","description":"Your request will retrieve all the events until this one"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/gethomecoachsdata":{"get":{"operationId":"iot_netatmo_gethomecoachsdata","summary":"The method gethomecoachsdata Returns data from a user Healthy Home Coach Station (measures and device…","description":"GET /gethomecoachsdata","tags":["iot"],"parameters":[{"name":"device_id","in":"query","required":false,"description":"Id of the device you want to retrieve information of","schema":{"type":"string","description":"Id of the device you want to retrieve information of"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/gethomedata":{"get":{"operationId":"iot_netatmo_gethomedata","summary":"Returns information about users homes and cameras.","description":"GET /gethomedata","tags":["iot"],"parameters":[{"name":"home_id","in":"query","required":false,"description":"Specify if you're looking for the events of a specific Home.","schema":{"type":"string","description":"Specify if you're looking for the events of a specific Home."}},{"name":"size","in":"query","required":false,"description":"Number of events to retrieve. Default is `30`.","schema":{"type":"integer","description":"Number of events to retrieve. Default is `30`."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/getlasteventof":{"get":{"operationId":"iot_netatmo_getlasteventof","summary":"Returns most recent events.","description":"GET /getlasteventof","tags":["iot"],"parameters":[{"name":"home_id","in":"query","required":true,"description":"ID of the Home you're interested in","schema":{"type":"string","description":"ID of the Home you're interested in"}},{"name":"person_id","in":"query","required":true,"description":"Your request will retrieve all events of the given home until the most recent event of the given person","schema":{"type":"string","description":"Your request will retrieve all events of the given home until the most recent event of the given person"}},{"name":"offset","in":"query","required":false,"description":"Number of events to retrieve. Default is 30.","schema":{"type":"integer","description":"Number of events to retrieve. Default is 30."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/getmeasure":{"get":{"operationId":"iot_netatmo_getmeasure","summary":"The method getmeasure returns the measurements of a device or a module.","description":"GET /getmeasure","tags":["iot"],"parameters":[{"name":"device_id","in":"query","required":true,"description":"Id of the device whose module's measurements you want to retrieve. This _id can be found in the user's devices field.","schema":{"type":"string","description":"Id of the device whose module's measurements you want to retrieve. This _id can be found in the user's devices field."}},{"name":"module_id","in":"query","required":false,"description":"If you don't specify any module_id you will retrieve the device's measurements. If you specify a module_id you will retrieve the module's…","schema":{"type":"string","description":"If you don't specify any module_id you will retrieve the device's measurements. If you specify a module_id you will retrieve the module's…"}},{"name":"scale","in":"query","required":true,"description":"Defines the time interval between two measurements. Possible values : max -> every value stored will be returned 30min -> 1 value every 30…","schema":{"type":"string","enum":["max","30min","1hour","3hours","1day","1week","1month"],"description":"Defines the time interval between two measurements. Possible values : max -> every value stored will be returned 30min -> 1 value every 30…"}},{"name":"type","in":"query","required":true,"description":"Measures you are interested in. Data you can request depends on the scale. **For Weather Station:** * max -> Temperature (°C), CO2 (ppm),…","schema":{"type":"array","description":"Measures you are interested in. Data you can request depends on the scale. **For Weather Station:** * max -> Temperature (°C), CO2 (ppm),…"}},{"name":"date_begin","in":"query","required":false,"description":"Starting timestamp (utc) of the requested measurements. Please note measurement retrieving is limited to 1024 measurements.","schema":{"type":"integer","description":"Starting timestamp (utc) of the requested measurements. Please note measurement retrieving is limited to 1024 measurements."}},{"name":"date_end","in":"query","required":false,"description":"Ending timestamp (utc) of the request measurements. If you want only the last measurement, do not provide date_begin, and set date_end to…","schema":{"type":"string","description":"Ending timestamp (utc) of the request measurements. If you want only the last measurement, do not provide date_begin, and set date_end to…"}},{"name":"limit","in":"query","required":false,"description":"Limits the number of measurements returned (default & max is 1024)","schema":{"type":"integer","description":"Limits the number of measurements returned (default & max is 1024)"}},{"name":"optimize","in":"query","required":false,"description":"Allows you to choose the format of the answer. If you build a mobile app and bandwith usage is an issue, use `optimize = true`. Use…","schema":{"type":"boolean","description":"Allows you to choose the format of the answer. If you build a mobile app and bandwith usage is an issue, use `optimize = true`. Use…"}},{"name":"real_time","in":"query","required":false,"description":"In scales higher than max, since the data is aggregated, the timestamps returned are by default offset by +(scale/2). For instance, if you…","schema":{"type":"boolean","description":"In scales higher than max, since the data is aggregated, the timestamps returned are by default offset by +(scale/2). For instance, if you…"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/getnextevents":{"get":{"operationId":"iot_netatmo_getnextevents","summary":"Returns previous events.","description":"GET /getnextevents","tags":["iot"],"parameters":[{"name":"home_id","in":"query","required":true,"description":"ID of the Home you're interested in","schema":{"type":"string","description":"ID of the Home you're interested in"}},{"name":"event_id","in":"query","required":true,"description":"Your request will retrieve events occured before this one","schema":{"type":"string","description":"Your request will retrieve events occured before this one"}},{"name":"size","in":"query","required":false,"description":"Number of events to retrieve. Default is 30.","schema":{"type":"integer","description":"Number of events to retrieve. Default is 30."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/getpublicdata":{"get":{"operationId":"iot_netatmo_getpublicdata","summary":"Retrieves publicly shared weather data from Outdoor Modules within a predefined area.","description":"GET /getpublicdata","tags":["iot"],"parameters":[{"name":"lat_ne","in":"query","required":true,"description":"Latitude of the north east corner of the requested area. -85 lat_sw","schema":{"type":"integer","description":"Latitude of the north east corner of the requested area. -85 lat_sw"}},{"name":"lon_ne","in":"query","required":true,"description":"Longitude of the north east corner of the requested area. -180 lon_sw","schema":{"type":"integer","description":"Longitude of the north east corner of the requested area. -180 lon_sw"}},{"name":"lat_sw","in":"query","required":true,"description":"Latitude of the south west corner of the requested area. -85 <= lat_sw <= 85","schema":{"type":"integer","description":"Latitude of the south west corner of the requested area. -85 <= lat_sw <= 85"}},{"name":"lon_sw","in":"query","required":true,"description":"Longitude of the south west corner of the requested area. -180 <= lon_sw <= 180","schema":{"type":"integer","description":"Longitude of the south west corner of the requested area. -180 <= lon_sw <= 180"}},{"name":"required_data","in":"query","required":false,"description":"To filter stations based on relevant measurements you want (e.g. rain will only return stations with rain gauges). Default is no filter.…","schema":{"type":"array","description":"To filter stations based on relevant measurements you want (e.g. rain will only return stations with rain gauges). Default is no filter.…"}},{"name":"filter","in":"query","required":false,"description":"True to exclude stations with abnormal temperature measures. Default is false.","schema":{"type":"boolean","description":"True to exclude stations with abnormal temperature measures. Default is false."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/getstationsdata":{"get":{"operationId":"iot_netatmo_getstationsdata","summary":"The method getstationsdata Returns data from a user's Weather Stations (measures and device specific data).","description":"GET /getstationsdata","tags":["iot"],"parameters":[{"name":"device_id","in":"query","required":false,"description":"Id of the device you want to retrieve information of","schema":{"type":"string","description":"Id of the device you want to retrieve information of"}},{"name":"get_favorites","in":"query","required":false,"description":"Whether to include the user's favorite Weather Stations in addition to the user's own Weather Stations","schema":{"type":"boolean","default":false,"description":"Whether to include the user's favorite Weather Stations in addition to the user's own Weather Stations"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/getthermostatsdata":{"get":{"operationId":"iot_netatmo_getthermostatsdata","summary":"The method getthermostatsdata returns information about user's thermostats such as their last measurements.","description":"GET /getthermostatsdata","tags":["iot"],"parameters":[{"name":"device_id","in":"query","required":false,"description":"Id of the device you want to retrieve information of","schema":{"type":"string","description":"Id of the device you want to retrieve information of"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/partnerdevices":{"get":{"operationId":"iot_netatmo_partnerdevices","summary":"The method partnerdevices returns the list of device_id to which your partner application has access to.","description":"GET /partnerdevices","tags":["iot"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/iot:netatmo/setpersonsaway":{"post":{"operationId":"iot_netatmo_setpersonsaway","summary":"Sets a person as 'Away' or the Home as 'Empty'. The event will be added to the user’s timeline.","description":"POST /setpersonsaway","tags":["iot"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["home_id"],"properties":{"home_id":{"type":"string","description":"ID of the Home you're interested in"},"person_id":{"type":"string","description":"If a person_id is specified, that person will be set as 'Away'. If no person_id is specified, the Home will be set as 'Empty'."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/iot:netatmo/setpersonshome":{"post":{"operationId":"iot_netatmo_setpersonshome","summary":"Sets a person as 'At home'.","description":"POST /setpersonshome","tags":["iot"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["home_id","person_ids"],"properties":{"home_id":{"type":"string","description":"ID of the Home you're interested in"},"person_ids":{"type":"string","description":"List of persons IDs"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/iot:netatmo/setthermpoint":{"post":{"operationId":"iot_netatmo_setthermpoint","summary":"The method setthermpoint changes the Thermostat manual temperature setpoint.","description":"POST /setthermpoint","tags":["iot"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["device_id","module_id","setpoint_mode"],"properties":{"device_id":{"type":"string","description":"The relay id"},"module_id":{"type":"string","description":"The thermostat id"},"setpoint_mode":{"type":"string","enum":["program","away","hg","manual","off","max"],"description":"Chosen setpoint_mode"},"setpoint_endtime":{"type":"integer","description":"When using the manual or max setpoint_mode, this parameter defines when the setpoint expires."},"setpoint_temp":{"type":"number","description":"When using the manual setpoint_mode, this parameter defines the temperature setpoint (in Celcius) to use."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/iot:netatmo/switchschedule":{"post":{"operationId":"iot_netatmo_switchschedule","summary":"The method switchschedule switches the Thermostat's schedule to another existing schedule.","description":"POST /switchschedule","tags":["iot"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["device_id","module_id","schedule_id"],"properties":{"device_id":{"type":"string","description":"The relay id"},"module_id":{"type":"string","description":"The thermostat id"},"schedule_id":{"type":"string","description":"The schedule id. It can be found in the getthermstate response, under the keys `therm_program_backup` and `therm_program`."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/iot:netatmo/syncschedule":{"post":{"operationId":"iot_netatmo_syncschedule","summary":"The method syncschedule changes the Thermostat weekly schedule.","description":"POST /syncschedule","tags":["iot"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["device_id","module_id"],"properties":{"device_id":{"type":"string","description":"The relay id"},"module_id":{"type":"string","description":"The thermostat id"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"RunEnvelope":{"type":"object","required":["project","data","timestamp"],"properties":{"project":{"type":"string","example":"dev-tools:hash"},"data":{},"timestamp":{"type":"string","format":"date-time"}}},"ErrorEnvelope":{"type":"object","properties":{"content":{},"message":{"type":"string"},"errors":{"type":"array","items":{}},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}},"responses":{"Error":{"description":"Invalid key, plan gate, rate limit or upstream failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}