{"openapi":"3.1.0","info":{"title":"Apizie","version":"2.0.0","description":"One API key, one envelope, many public data sources."},"servers":[{"url":"https://zieapi.vercel.app"}],"security":[{"ApiKeyAuth":[]}],"paths":{"/v1/iot:dweet/create-alert-get":{"get":{"operationId":"iot_dweet_create_alert_get","summary":"Create an alert for a thing. A thing must be locked before an alert can be set.","description":"GET /alert/{who}/when/{thing}/{condition}","tags":["iot"],"parameters":[{"name":"who","in":"query","required":true,"description":"A comma separated list of Email addresses to send the alert to.","schema":{"type":"string","description":"A comma separated list of Email addresses to send the alert to."}},{"name":"thing","in":"query","required":true,"description":"A unique name of a thing. It is recommended that you use a GUID as to avoid name collisions.","schema":{"type":"string","description":"A unique name of a thing. It is recommended that you use a GUID as to avoid name collisions."}},{"name":"condition","in":"query","required":true,"description":"A condition that returns a string or a true value if a condition is met.","schema":{"type":"string","description":"A condition that returns a string or a true value if a condition is met."}},{"name":"key","in":"query","required":true,"description":"A valid key for a locked thing. If the thing is not locked, this can be ignored.","schema":{"type":"string","description":"A valid key for a locked thing. If the thing is not locked, this can be ignored."}}],"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":"live"}},"/v1/iot:dweet/post-dweet-for-thing":{"post":{"operationId":"iot_dweet_post_dweet_for_thing","summary":"Create a dweet for a thing.","description":"POST /dweet/for/{thing}","tags":["iot"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["thing","body"],"properties":{"thing":{"type":"string","description":"A unique name of a thing. It is recommended that you use a GUID as to avoid name collisions."},"key":{"type":"string","description":"A valid key for a locked thing. If the thing is not locked, this can be ignored."},"body":{"type":"object","description":"JSON request body"}}}}}},"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":"live"}},"/v1/iot:dweet/post-dweet-quietly-for-thing":{"post":{"operationId":"iot_dweet_post_dweet_quietly_for_thing","summary":"Create a dweet for a thing. This method differs from /dweet/for/{thing} only in that successful dweets…","description":"POST /dweet/quietly/for/{thing}","tags":["iot"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["thing","body"],"properties":{"thing":{"type":"string","description":"A unique name of a thing. It is recommended that you use a GUID as to avoid name collisions."},"key":{"type":"string","description":"A valid key for a locked thing. If the thing is not locked, this can be ignored."},"body":{"type":"object","description":"JSON request body"}}}}}},"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":"live"}},"/v1/iot:dweet/get-alert":{"get":{"operationId":"iot_dweet_get_alert","summary":"Get the alert attached to a thing.","description":"GET /get/alert/for/{thing}","tags":["iot"],"parameters":[{"name":"thing","in":"query","required":true,"description":"A unique name of a thing.","schema":{"type":"string","description":"A unique name of a thing."}},{"name":"key","in":"query","required":true,"description":"A valid key for a locked thing. If the thing is not locked, this can be ignored.","schema":{"type":"string","description":"A valid key for a locked thing. If the thing is not locked, this can be ignored."}}],"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":"live"}},"/v1/iot:dweet/get-get-dweets-for-thing":{"get":{"operationId":"iot_dweet_get_get_dweets_for_thing","summary":"Read the last 5 cached dweets for a thing.","description":"GET /get/dweets/for/{thing}","tags":["iot"],"parameters":[{"name":"thing","in":"query","required":true,"description":"A unique name of a thing.","schema":{"type":"string","description":"A unique name of a thing."}},{"name":"key","in":"query","required":false,"description":"A valid key for a locked thing. If the thing is not locked, this can be ignored.","schema":{"type":"string","description":"A valid key for a locked thing. If the thing is not locked, this can be ignored."}}],"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":"live"}},"/v1/iot:dweet/get-latest-dweet":{"get":{"operationId":"iot_dweet_get_latest_dweet","summary":"Read the latest dweet for a thing.","description":"GET /get/latest/dweet/for/{thing}","tags":["iot"],"parameters":[{"name":"thing","in":"query","required":true,"description":"A unique name of a thing.","schema":{"type":"string","description":"A unique name of a thing."}},{"name":"key","in":"query","required":false,"description":"A valid key for a locked thing. If the thing is not locked, this can be ignored.","schema":{"type":"string","description":"A valid key for a locked thing. If the thing is not locked, this can be ignored."}}],"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":"live"}},"/v1/iot:dweet/get-stored-alerts":{"get":{"operationId":"iot_dweet_get_stored_alerts","summary":"Read all the saved alerts for a thing from long term storage. You can query a maximum of 1 day per request…","description":"GET /get/stored/alerts/for/{thing}","tags":["iot"],"parameters":[{"name":"thing","in":"query","required":true,"description":"A unique name of a thing.","schema":{"type":"string","description":"A unique name of a thing."}},{"name":"key","in":"query","required":true,"description":"A valid key for a locked thing. If the thing is not locked, this can be ignored.","schema":{"type":"string","description":"A valid key for a locked thing. If the thing is not locked, this can be ignored."}},{"name":"date","in":"query","required":true,"description":"The calendar date (YYYY-MM-DD) from which you'd like to start your query. The response will be a maximum of one day.","schema":{"type":"string","description":"The calendar date (YYYY-MM-DD) from which you'd like to start your query. The response will be a maximum of one day."}},{"name":"hour","in":"query","required":false,"description":"The hour of the day represented in the date parameter in 24-hour (00-23) format. If this parameter is included, a maximum of 1 hour will…","schema":{"type":"string","description":"The hour of the day represented in the date parameter in 24-hour (00-23) format. If this parameter is included, a maximum of 1 hour will…"}},{"name":"responseType","in":"query","required":false,"description":"Current valid parameters for this are 'csv' and 'json'. If this parameter is left blank, all responses default to hapi-json dweet-speak.","schema":{"type":"string","description":"Current valid parameters for this are 'csv' and 'json'. If this parameter is left blank, all responses default to hapi-json dweet-speak."}}],"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":"live"}},"/v1/iot:dweet/get-get-stored-dweets-for-thing":{"get":{"operationId":"iot_dweet_get_get_stored_dweets_for_thing","summary":"Read all the saved dweets for a thing from long term storage. You can query a maximum of 1 day per request…","description":"GET /get/stored/dweets/for/{thing}","tags":["iot"],"parameters":[{"name":"thing","in":"query","required":true,"description":"A unique name of a thing.","schema":{"type":"string","description":"A unique name of a thing."}},{"name":"key","in":"query","required":true,"description":"A valid key for a locked thing. If the thing is not locked, this can be ignored.","schema":{"type":"string","description":"A valid key for a locked thing. If the thing is not locked, this can be ignored."}},{"name":"date","in":"query","required":true,"description":"The calendar date (YYYY-MM-DD) from which you'd like to start your query. The response will be a maximum of one day.","schema":{"type":"string","description":"The calendar date (YYYY-MM-DD) from which you'd like to start your query. The response will be a maximum of one day."}},{"name":"hour","in":"query","required":false,"description":"The hour of the day represented in the date parameter in 24-hour (00-23) format. If this parameter is included, a maximum of 1 hour will…","schema":{"type":"string","description":"The hour of the day represented in the date parameter in 24-hour (00-23) format. If this parameter is included, a maximum of 1 hour will…"}},{"name":"responseType","in":"query","required":false,"description":"Current valid parameters for this are 'csv' and 'json'. If this parameter is left blank, all responses default to hapi-json dweet-speak.","schema":{"type":"string","description":"Current valid parameters for this are 'csv' and 'json'. If this parameter is left blank, all responses default to hapi-json dweet-speak."}}],"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":"live"}},"/v1/iot:dweet/listen-for-dweets":{"get":{"operationId":"iot_dweet_listen_for_dweets","summary":"Listen for dweets from a thing.","description":"GET /listen/for/dweets/from/{thing}","tags":["iot"],"parameters":[{"name":"thing","in":"query","required":true,"schema":{"type":"string"}}],"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":"live"}},"/v1/iot:dweet/lock-thing":{"get":{"operationId":"iot_dweet_lock_thing","summary":"Reserve and lock a thing.","description":"GET /lock/{thing}","tags":["iot"],"parameters":[{"name":"thing","in":"query","required":true,"description":"A unique name of a thing.","schema":{"type":"string","description":"A unique name of a thing."}},{"name":"lock","in":"query","required":true,"description":"A valid dweet.io lock.","schema":{"type":"string","description":"A valid dweet.io lock."}},{"name":"key","in":"query","required":true,"description":"A valid dweet.io master key.","schema":{"type":"string","description":"A valid dweet.io master key."}}],"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":"live"}},"/v1/iot:dweet/remove-alert":{"get":{"operationId":"iot_dweet_remove_alert","summary":"Remove an alert for a thing.","description":"GET /remove/alert/for/{thing}","tags":["iot"],"parameters":[{"name":"thing","in":"query","required":true,"description":"A unique name of a thing.","schema":{"type":"string","description":"A unique name of a thing."}},{"name":"key","in":"query","required":true,"description":"A valid key for a locked thing. If the thing is not locked, this can be ignored.","schema":{"type":"string","description":"A valid key for a locked thing. If the thing is not locked, this can be ignored."}}],"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":"live"}},"/v1/iot:dweet/remove-lock":{"get":{"operationId":"iot_dweet_remove_lock","summary":"Remove a lock from thing.","description":"GET /remove/lock/{lock}","tags":["iot"],"parameters":[{"name":"lock","in":"query","required":true,"description":"A valid dweet.io lock.","schema":{"type":"string","description":"A valid dweet.io lock."}},{"name":"key","in":"query","required":true,"description":"A valid dweet.io master key.","schema":{"type":"string","description":"A valid dweet.io master key."}}],"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":"live"}},"/v1/iot:dweet/unlock-thing":{"get":{"operationId":"iot_dweet_unlock_thing","summary":"Unlock a thing.","description":"GET /unlock/{thing}","tags":["iot"],"parameters":[{"name":"thing","in":"query","required":true,"description":"A unique name of a thing.","schema":{"type":"string","description":"A unique name of a thing."}},{"name":"key","in":"query","required":true,"description":"A valid dweet.io master key.","schema":{"type":"string","description":"A valid dweet.io master key."}}],"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":"live"}}},"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"}}}}}}}