{"openapi":"3.0.1","info":{"title":"Atmosphere IoT Platform API v2","description":"# Introduction\n\nThe Atmosphere v2 HTTP API is based on OpenAPI v3, making it easy to use. It follows RESTful\nbest practices and drastically simplifies the process of registering a new device.\nAdding a device is accomplished as a `POST /v2/devices`, and exchanging data with the\nplatform from your embedded device is accomplished via Device Events and Cloud Events\n(`/events/*`). The v2 API also provides full capabilities for managing Organizations and Users.\n\nThe JSON format of API specification is available at\nhttps://platform.atmosphereiot.com/spec. Tools such as Postman can import this\nURL and automatically generate a comprehensive menu of available operations, with\nparameters and examples. Just plug in your API key or device token and start submitting\nrequests. We even use the spec in combination with swagger-js to automatically\ngenerate code in the Atmosphere IoT web UI.\n\n# Rate Limits\n\nRate limits are applied to all HTTP requests.\nThey are subject to change, and may vary according to the\n[authentication mechanism](#section/Authentication)\nbeing used in the request (i.e. per-user if using `jwt` or `apiToken`, or per-device if\nusing a `deviceToken`.\n\nNote that the user interface also uses this API. So both browser usage and\ndirect API usage apply to per-user rate limits.\n\nThe following HTTP response headers can be used for\ndetermining the specific rate limits that have been applied:\n\n| Response Header | Description |\n|-----------|-------------|\n| x-ratelimit-limit | The number of requests allowed in the current period. |\n| x-ratelimit-reset | The time at which the current period will expire. This is specified as a unix timestamp. |\n| x-ratelimit-remaining | The number of allowed requests remaining between now and the expiration time. |\n\n# Getting More Help\n\nStill have questions? Our Forums are the best way to interact with other users and\nAtmosphere IoT engineers. https://forum.atmosphereiot.com/\n","contact":{"name":"Atmosphere IoT","url":"https://www.atmosphereiot.com"},"x-logo":{"url":"https://developer.atmosphereiot.com/images/nav-logo-dark.svg","altText":"Atmosphere IoT Documentation Logo"},"version":"2.0.0"},"externalDocs":{"description":"This documentation is specific to our HTTP API. See our full documentation hub\nfor details on the Atmosphere IoT Platform.\n","url":"https://docs.atmosphereiot.com"},"servers":[{"url":"https://platform.atmosphereiot.com/v2","description":"Production Server"}],"tags":[{"name":"auth","description":"Authentication, security tokens, login/logout, etc"},{"name":"data","description":"Your project design can use Storage Elements to persist data according to your\nneeds. Each such Storage Element effectively represents its own time-series\ndatabase. Individual data records stored in a Storage Element are queried via the `data`\nAPI. There is also a specialized API to fetch a summary of the \"last values\" stored in\na Storage Element, in the event that you do not save the same payload every time the\nelement is triggered.\n\nNote that the data you store in a Storage Element is not necessarily the same as the raw\ndata your device sends to the platform. The raw data is captured as an Event, but may be\ntransformed by your project before being stored in a Storage Element.\n"},{"name":"devices","description":"Operations concerning devices"},{"name":"events","description":"Events are the primary data structures that a device uses to exchange data with the\nAtmosphere cloud platform. This is comprised of \"Device Events\", which are events sent\nby the device to the cloud, and \"Cloud Events\", which are events sent by the cloud to a\ndevice.\n\nFor devices using HTTP as their communication protocol, the `/events` API is the primary\ninterface to send and receive data. It is optimized to make it as easy as possible for\nyour embedded device to communicate with Atmosphere over HTTP.\n\nRegardless of what protocol your device uses to communicate with Atmosphere (HTTP,\nSigFox, TTN, etc), a device's Event history may be accessed under\n`/devices/{deviceId}/events`. Events are retained and accessible for a period of six months.\nThis is primarily useful for troubleshooting, and is not intended for primary data storage.\n\nNote that an \"Event\" is fundamentally different than a \"Stored Value\".\nDeviceEvents are the raw data sent by your device to the cloud. Your project design may\nfilter, transform, or perform other logic when a device sends data. Thus, what your\nproject stores in a Storage Element (`/devices/{deviceId}/data`) may be entirely\ndifferent than the raw data your device sends or receives (`/devices/{deviceId}/events`).\n"},{"name":"organizations","description":"Operations concerning organizations"},{"name":"projects","description":"A Project embodies your application functionality on the platform. It contains the logic for\nprocessing data from your device, and optionally logic for the device itself (i.e. firmware)\nand/or a user interface that can be utilized on the web or in the mobile app.\n"},{"name":"storage","description":"Your project design can use Storage Elements to persist information that your\nproject needs. Each such Storage Element effectively represents its own time-series\ndatabase. Data stored in a Storage Element is accessed via the `data` API, and the\ndatabase itself may be managed through the `storage` API.\n\nThe `storage` API provides operations such as checking the size of a Storage Element,\nand clearing out its data. Storage Elements are created automatically, according to\nyour project design.\n"},{"name":"users","description":"Operations concerning users"},{"name":"notifications","description":"Operations concerning notifications"}],"paths":{"/auth/register":{"post":{"tags":["auth"],"summary":"Register","description":"Creates a new user. Requires that password and passwordConfirmation are set.","operationId":"registerUser","x-eov-operation-id":"create","x-eov-operation-handler":"users","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewUser"}}}},"responses":{"201":{"description":"User created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/auth/verify/{nonce}":{"parameters":[{"name":"nonce","in":"path","description":"Account Verification Token","required":true,"schema":{"type":"string"}}],"get":{"tags":["auth"],"summary":"Verify Account","description":"Verify your account with the verification token sent via email.\n","security":[],"operationId":"verifyAccount","x-eov-operation-id":"verifyAccount","x-eov-operation-handler":"auth","responses":{"302":{"description":"successful verification."},"404":{"$ref":"#/components/responses/Error"}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Submit username/password, and receive a JWT in the response for making further requests to the rest of the API.","security":[],"operationId":"createLogin","x-eov-operation-id":"login","x-eov-operation-handler":"auth","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}}},"responses":{"201":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JWT"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Log out of the platform","description":"Log out of the platform, and invalidate the current user's JWT/refresh tokens. It is the caller's responsibility to provide the tokens which need to be invalidated.","security":[{"jwt":[]},{"refreshToken":[]}],"operationId":"logout","x-eov-operation-id":"logout","x-eov-operation-handler":"auth","responses":{"204":{"description":"Logout successful"},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/auth/refreshToken":{"get":{"tags":["auth"],"summary":"Refresh JWT","description":"Authenticates the caller using `refreshToken` authentication, and returns a JWT, which may be used for subsequent calls to the API.","security":[{"refreshToken":[]}],"operationId":"getJWT","x-eov-operation-id":"refreshToken","x-eov-operation-handler":"auth","responses":{"201":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JWT"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/auth/user":{"get":{"tags":["auth"],"summary":"Current User","description":"Returns the currently logged-in user.","operationId":"getCurrentUser","x-eov-operation-id":"currentUser","x-eov-operation-handler":"auth","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/devices":{"get":{"tags":["devices"],"summary":"List devices\n","description":"Fetches devices according to the parameters given.\n\nSupported sort fields:\n* name (default)\n* description\n","operationId":"getDevices","x-eov-operation-id":"index","x-eov-operation-handler":"devices","parameters":[{"$ref":"#/components/parameters/depth"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/searchText"},{"$ref":"#/components/parameters/sortBy"},{"$ref":"#/components/parameters/lastValues"},{"$ref":"#/components/parameters/entityList"}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Devices"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}},"post":{"tags":["devices"],"summary":"Create a new device","description":"Create a new device, responds with the newly created device","operationId":"postDevices","x-eov-operation-id":"create","x-eov-operation-handler":"devices","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"responses":{"201":{"description":"Device created successfully.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Device"},{"type":"object","required":["token"],"properties":{"token":{"description":"This is a [deviceToken](#section/Authentication/deviceToken) intended to be\nused by the device for authentication with the platform. This token will ONLY\nbe shown in the response to creating a new device. It is effectively a\npassword or security token, and should be treated as such.\n","type":"string","readOnly":true}}}]}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/devices/locations":{"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/depth"}],"get":{"tags":["devices"],"summary":"Fetch all devices along with their locations","description":"Returns the device locations.","operationId":"getDeviceLocations","x-eov-operation-id":"index","x-eov-operation-handler":"deviceLocations","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceLocations"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{id}":{"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/lastValues"}],"get":{"tags":["devices"],"summary":"Fetch a device","description":"Returns the device with the specified ID.","operationId":"getDevice","x-eov-operation-id":"show","x-eov-operation-handler":"devices","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"tags":["devices"],"summary":"Update a device","description":"Updates the device with the specified ID and returns the updated version.","operationId":"updateDevice","x-eov-operation-id":"update","x-eov-operation-handler":"devices","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["devices"],"summary":"Delete a device","description":"Deletes the device with the specified ID.","operationId":"deleteDevice","x-eov-operation-id":"destroy","x-eov-operation-handler":"devices","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{id}/data/{elementName}":{"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/elementName"}],"get":{"tags":["data"],"summary":"List stored values in a Storage Element","description":"List stored values in a Storage Element.\n\nValues are sorted in reverse-time-order (i.e. newest first), by default.\nThe `sortBy` parameter is supported for any value present in\nthe payload. For example, if you have payloads that look like\n`{ payload: { temp: 55, humidity: 67 }`\nand you want to sort by temp, the query parameter would be\n`sortBy=payload.temp`.\n","operationId":"getDeviceData","x-eov-operation-id":"index","x-eov-operation-handler":"deviceData","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/sortBy"},{"in":"query","name":"filter","schema":{"type":"object"},"style":"deepObject","explode":true,"description":"Filter the results according to the options given. All `filter` parameters are\nlogically \"ANDed\" together. Each filter parameter requires:\n\n* the data field to match\n* the operation to perform\n* the value to match\n\nThe format is `filter[{field}][{operator}]={value}`\n\n#### Supported operators\n\n| Operator | Description |\n|-----------|-------------|\n| `eq` | Matches values that are equal to a specified value. |\n| `ne` | Matches all values that are not equal to a specified value. |\n| `lt` | Matches values that are less than a specified value. |\n| `lte` | Matches values that are less than or equal to a specified value. |\n| `gt` | Matches values that are greater than a specified value. |\n| `gte` | Matches values that are greater than or equal to a specified value. |\n| `in` | Matches any of the values specified in a comma-separated array of values. |\n| `nin` | Matches none of the values specified in a comma-separated array of values. |\n\nSome examples:\n\n| Description | Query Parameters |\n|-----------|-------------|\n| where `temp` is greater than `55` | `?filter[temp][gt]=55` |\n| where `temp` is greater than `55` AND the `humidity` is less than `67` | `?filter[temp][gt]=55&filter[humidity][lt]=67` |\n"}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredValues"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{deviceId}/events":{"parameters":[{"name":"deviceId","in":"path","description":"Resource ID","required":true,"schema":{"type":"string"}}],"get":{"tags":["devices"],"summary":"Fetch Events for a device","description":"Queries the Event history for a device (CloudEvents and DeviceEvents).\nThis is primarily useful for troubleshooting,\nand is not intended for primary data storage.\n","operationId":"getDeviceEvents","x-eov-operation-id":"index","x-eov-operation-handler":"deviceEvents","parameters":[{"in":"query","name":"deviceEvents","description":"Include Device Events (events sent from a device to the cloud) in the response.","schema":{"type":"boolean","default":true}},{"in":"query","name":"cloudEvents","description":"Include Cloud Events (events sent from the cloud to a device) in the response.","schema":{"type":"boolean","default":true}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Events"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{deviceId}/events/{id}":{"parameters":[{"name":"deviceId","in":"path","description":"Resource ID","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/id"}],"get":{"tags":["devices"],"summary":"Fetch an Event for a device","description":"Returns the event with the specified ID.","operationId":"getDeviceEvent","x-eov-operation-id":"show","x-eov-operation-handler":"deviceEvents","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{id}/image":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["devices"],"summary":"Fetch a device's image","description":"Returns the device image","operationId":"getDeviceImage","x-eov-operation-id":"show","x-eov-operation-handler":"deviceImage","responses":{"200":{"description":"successful operation","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Image"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["devices"],"summary":"Update a Device's image","description":"Updates the image for the specified ID.","operationId":"updateDeviceImage","x-eov-operation-id":"create","x-eov-operation-handler":"deviceImage","requestBody":{"required":true,"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Image"}}}},"responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["devices"],"summary":"Delete a device's image","description":"Deletes the image set set for the specified device ID.","operationId":"deleteDeviceImage","x-eov-operation-id":"destroy","x-eov-operation-handler":"deviceImage","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{id}/last/{elementName}":{"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/elementName"}],"get":{"tags":["data"],"summary":"A storage element's \"last values\".\n","description":"Fetches a \"composite\" of the most recent data records for a specific\nstorage element on a device. If your device sends multiple readings, but not always\nat the same time, you can use this API to see the most recent values for all the\nkeys that have been provided.\n\nExample: A device that sends a temperature reading of `{\"temp\": \"55\"}` and then later\nsends a humidity reading of `{\"humidity\": \"67\"}` would have a \"last values\" of\n`{\"temp\": \"55\", \"humidity\": \"67\"}`.\n\nNote: This API is intended for cases where you store a JSON data type that is an\nobject-literal (i.e. `{\"foo\": \"bar\"}`). It is useful when your device might not\nsend the full set of values with every Device Event. If you store other\nJSON data types (i.e. `null`, `true`, `false`, `[{a:b},{c:d}]`, `\"astring\"`),\nthis API will always return the most recent value stored.\n","operationId":"getLastDeviceData","x-eov-operation-id":"index","x-eov-operation-handler":"deviceLast","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LastValue"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{id}/storage":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["storage"],"summary":"Fetches descriptions of storage elements for a device\n","description":"Fetches devices according to the parameters given.\n\nSupported sort fields:\n* name (default)\n","operationId":"getDeviceStorageElements","x-eov-operation-id":"index","x-eov-operation-handler":"deviceStorage","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageElements"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["storage"],"summary":"Delete all storage elements for a device.\n","description":"Delete all storage elements for a device. This operation is permanent and\ncannot be undone.\n","operationId":"deleteDeviceStorageElements","x-eov-operation-id":"destroyAll","x-eov-operation-handler":"deviceStorage","responses":{"204":{"description":"successful operation"},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{id}/storage/{elementName}":{"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/elementName"}],"get":{"tags":["storage"],"summary":"Fetches the description of a particular storage element for a device\n","description":"Fetches devices according to the parameters given.\n","operationId":"getDeviceStorageElement","x-eov-operation-id":"show","x-eov-operation-handler":"deviceStorage","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageElement"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["storage"],"summary":"Delete a storage element for a device, by element name.\n","description":"Delete a storage element for a device, by element name. This operation is permanent and\ncannot be undone.\n","operationId":"deleteDeviceStorageElement","x-eov-operation-id":"destroy","x-eov-operation-handler":"deviceStorage","responses":{"204":{"description":"successful operation"},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/settings":{"post":{"tags":["devices"],"summary":"Change settings for multiple devices","description":"Devices settings may be updated for a plethora of devices","operationId":"batchUpdateDeviceSettings","x-eov-operation-id":"batchUpdate","x-eov-operation-handler":"multipleDeviceSettings","requestBody":{"$ref":"#/components/requestBodies/MultipleDeviceSettings"},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array"},"data":{"type":"array"}},"example":{"data":[{"id":"61094cd684eff421ddf45ae0","deviceId":"61094cd284eff421ddf45a50","createdAt":"2021-08-03T14:04:02.982Z","updatedAt":"2021-08-03T14:04:06.117Z","name":"Vietnam_0d4c986b-6e4e-4e4d-8f16-0bca022c8f5c","title":"web-readiness","description":"Implementation","inputType":"text","inputTypeProperties":["Object"],"listOrder":7,"value":"\"Liaison\"","defaultValue":"\"Human\"","changedById":"61094cd284eff421ddf45a47"},{"id":"61094cd684eff421ddf45ae1","deviceId":"61094cd284eff421ddf45a50","createdAt":"2021-08-02T14:04:02.985Z","updatedAt":"2021-08-03T14:04:06.119Z","name":"payment_8bb97798-528e-470d-95fa-42e18ca2d864","title":"Grocery","description":"Principal USB connect","inputType":"toggle","inputTypeProperties":["Object"],"listOrder":16,"value":true,"defaultValue":false,"changedById":"61094cd284eff421ddf45a47"},{"id":"61094cd684eff421ddf45ae2","deviceId":"61094cd284eff421ddf45a50","createdAt":"2021-08-01T14:04:02.987Z","updatedAt":"2021-08-03T14:04:06.122Z","name":"circuit_76b27dda-512d-4afe-9427-0ab951d60536","title":"benchmark","description":"calculating","inputType":"number","inputTypeProperties":["Object"],"listOrder":26,"value":59,"defaultValue":50,"changedById":"61094cd284eff421ddf45a47"}],"errors":[{"message":"deviceId: 61094d5d2442f0226e65f9c0 failed to save updated setting \"Generic Plastic Chicken\" with value -2 as the setting is not modifiable by user: Everette.Kautzer"},{"message":"deviceId: 61094d5d2442f0226e65f9c5 failed to save updated setting \"virtual_ab6b67aa-8955-4a84-bb98-6551817fd68b\" with value {\"cherries\": 2} as the setting is not modifiable by user: Everette.Kautzer"}]}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/settings/defaults":{"post":{"tags":["devices"],"summary":"Get default settings for a list of devices","description":"When configuring device settings en masse, it is useful to know what the default settings are for each type of device. The endpoint will analyze the unique projects from the list of devices and return the default settings for that project.","operationId":"batchDefaultSettings","x-eov-operation-handler":"multipleDeviceSettings","requestBody":{"$ref":"#/components/requestBodies/deviceIdList"},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","example":{"errors":[{"message":"No available default settings","projectUuid":"f7ae7a43-8132-483c-9193-0ecf8f00a942","versionUuid":"8485e54e-4020-4b06-94e7-997ad2554176"}],"data":[{"projectUuid":"a591a110-3f58-4512-bb03-a5b95f9437d8","versionUuid":"295c8c00-e8ae-49fc-9eb0-948aa86224d0","deviceIdList":["6103aa263aa92a0025d509b9","61035bbc3aa92a0025d48861","61046de31d009a00266bf732","61039fda8699ef0026fc23fe","61046de88bebd900253ca630","61031e314bab6600261cfa5b","61035d723aa92a0025d48c2d","6103513c789cc10026dab9b9","61046ddb264d6100250eb430","6103315242be7e00260ec1f9","6103325ac4f1a00025e2b8a3","6103f4e342be7e00260fdb17","61046ddfb067790026f77e25","6103276c3aa92a0025d42b2f","61046d908bebd900253ca2b6","6105b8878bebd900253fe360","60c3f824463d0d0026f86302"],"defaultSettings":[{"listOrder":0,"inputType":"text","inputTypeProperties":null,"defaultValue":"Test","_id":"611aa908db1fed2fcf258013","title":"","description":""},{"listOrder":0,"inputType":"number","defaultValue":"2","_id":"611aa908db1fed2fcf258014","title":"","description":""},{"listOrder":0,"inputType":"toggle","defaultValue":"false","_id":"611aa908db1fed2fcf258015","title":"","description":""}]}]}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{id}/settings":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["devices"],"summary":"Fetch a device's settings","description":"Returns the device settings","operationId":"getDeviceSettings","x-eov-operation-id":"index","x-eov-operation-handler":"deviceSettings","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/sortBy"}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceSettings"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["devices"],"summary":"Reset all of a device's settings","description":"Resets all device settings","operationId":"resetAllDeviceSettings","x-eov-operation-id":"destroyAll","x-eov-operation-handler":"deviceSettings","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{id}/settings/{settingName}":{"parameters":[{"$ref":"#/components/parameters/id"},{"in":"path","name":"settingName","description":"The name of a device setting","required":true,"schema":{"type":"string"}}],"get":{"tags":["devices"],"summary":"Fetch a device setting by name","description":"Returns the device setting by name","operationId":"getDeviceSetting","x-eov-operation-id":"show","x-eov-operation-handler":"deviceSettings","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceSetting"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"tags":["devices"],"summary":"Update a device setting by name","description":"Updates the device setting by name, the request body is essential.","operationId":"updateDeviceSetting","x-eov-operation-id":"update","x-eov-operation-handler":"deviceSettings","requestBody":{"description":"In order to keep things as simple as possible for device settings, this API is intended to support a variety of values. Thus, there are no envelopes, wrappers, or other data structures required. Any valid JSON supported by OpenAPI 3 may be passed as the body. OpenAPI 3 supports all JSON Schema data types EXCEPT `null`.\nIf you have a need to support a content type other than application/json, please contact support and let us know.","required":true,"content":{"application/json":{"schema":{"example":{"foo":"bar"},"anyOf":[{"type":"string"},{"type":"object"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}}]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceSetting"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["devices"],"summary":"Reset a device setting by name","description":"Resets the device setting by name","operationId":"resetDeviceSetting","x-eov-operation-id":"destroy","x-eov-operation-handler":"deviceSettings","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/devices/{id}/settings/history":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["devices"],"summary":"Fetch the history of changes applied to the device's settings","description":"Returns the history of all the device settings","operationId":"getDeviceSettingsHistory","x-eov-operation-id":"index","x-eov-operation-handler":"deviceSettingsHistory","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/sortBy"}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceSettings"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/events/device":{"post":{"tags":["events"],"summary":"Post an Event for a device","description":"Posts a DeviceEvent for a device, which will then be sent for processing by the Cloud\nPlane of the project associated with that device. This is the primary API for devices\nto send data to the cloud via HTTP.\n\nIf a device token is used for authentication,\nThe device ID is determined from the token, and the `deviceId` query parameter is ignored.\nIf another form of authentication is used, the `deviceId` parameter must be provided.\n","operationId":"postDeviceEvent","x-eov-operation-id":"create","x-eov-operation-handler":"events","security":[{"jwt":[]},{"apiKey":[]},{"apiKeyAlt":[]},{"deviceToken":[]}],"parameters":[{"in":"query","name":"deviceId","description":"ID of the device sending the data. Only required if `token` authentication is NOT used. If `token` authentication is used, the device ID will be derived from the token, and this parameter will be ignored.","schema":{"type":"string"}},{"in":"query","name":"elementName","description":"Element Name","schema":{"type":"string"}}],"requestBody":{"description":"In order to keep things as simple as possible for embedded devices, this API\nis intended to support whatever payload makes sense for your application. Thus,\nthere are no envelopes, wrappers, or other data structures required. Any valid\nJSON supported by OpenAPI 3 may be passed as the body. OpenAPI 3\nsupports all JSON Schema data types EXCEPT `null`.\n\nCurrently, only `application/json` is supported. For binary data payloads,\nwe recommend Base64 encoding it, and sending it as a string. But if you have a need\nto support a content type other than application/json, please contact support\nand let us know.\n","required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","nullable":true},{"type":"string","nullable":true},{"type":"number","nullable":true},{"type":"boolean","nullable":true},{"type":"array","nullable":true}],"example":{"foo":"bar"}}}}},"responses":{"201":{"description":"Device Event successfully created.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","readOnly":true,"example":"5f3173b60fc786002524e2bd","description":"The ID of the Device Event that was created. Only the\n`id` of the created Device Event, in order to minimize\nthe size of the response payload.\n"}}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/events/cloud":{"get":{"tags":["events"],"summary":"Fetch multiple queued cloud events for a device","description":"Returns the next queued CloudEvent for the device. Returns 204 NO CONTENT if there are none.\n\nCloudEvents are a queue of messages for a device. By default, they are dequeued when accessed. If you\nwish to access events in the queue without removing them from the queue (a \"peek\"),\nthis may be accomplished by setting `peek=true`.\n\nIf a device token is used for authentication,\nThe device ID is determined from the token, and the `deviceId` query parameter is ignored.\nIf another form of authentication is used, the `deviceId` parameter must be provided.\n","operationId":"getCloudEvents","x-eov-operation-id":"index","x-eov-operation-handler":"events","security":[{"jwt":[]},{"apiKey":[]},{"apiKeyAlt":[]},{"deviceToken":[]}],"parameters":[{"in":"query","name":"deviceId","description":"Device ID","schema":{"type":"string","description":"Device ID to query. Required if `token` auth is not used. Ignored if `token` auth is used."}},{"in":"query","name":"peek","description":"A \"peek\" operation on the cloud event queue. If false (default), viewing the event will de-queue it, effectively \"marking it as read.\" If true, the events returned will remain on the queue, and be returned again on the next request.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/page"},{"in":"query","name":"elementName","description":"Element Name","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/events/cloud/next":{"get":{"tags":["events"],"summary":"Fetch the next queued cloud event for a device","description":"Returns the next queued CloudEvent for the device. Returns 204 NO CONTENT if there are none.\n\nCloudEvents are a queue of messages for a device. By default, they are dequeued when accessed. If you\nwish to access events in the queue without removing them from the queue (a \"peek\"),\nthis may be accomplished by setting `peek=true`.\n\nIf a device token is used for authentication,\nThe device ID is determined from the token, and the `deviceId` query parameter is ignored.\nIf another form of authentication is used, the `deviceId` parameter must be provided.\n","operationId":"getCloudEvent","x-eov-operation-id":"next","x-eov-operation-handler":"events","security":[{"jwt":[]},{"apiKey":[]},{"apiKeyAlt":[]},{"deviceToken":[]}],"parameters":[{"in":"query","name":"deviceId","description":"Device ID","schema":{"type":"string","description":"Device ID to query. Required if `token` auth is not used. Ignored if `token` auth is used."}},{"in":"query","name":"peek","description":"A \"peek\" operation on the cloud event queue. If false (default), viewing the event will de-queue it, effectively \"marking it as read.\" If true, the events returned will remain on the queue, and be returned again on the next request.","schema":{"type":"boolean","default":false}},{"in":"query","name":"elementName","description":"Element Name","schema":{"type":"string"}}],"responses":{"200":{"description":"Request successful. Next event in the body.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","nullable":true},{"type":"array","nullable":true},{"type":"string","nullable":true},{"type":"integer","nullable":true},{"type":"number","nullable":true},{"type":"boolean","nullable":true}]}}}},"204":{"description":"Request successful, but no events available on the queue."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/events/integrations":{"post":{"tags":["events"],"summary":"Third-party Device Event integrations","description":"Send an HTTP webhook to Atmosphere from your third-party IoT service.","operationId":"postIntegrationEvent","x-eov-operation-id":"create","x-eov-operation-handler":"integrationEvents","x-eov-allow-unknown-query-parameters":true,"security":[{"apiKey":[]},{"apiKeyAlt":[]}],"parameters":[{"in":"query","name":"integration","description":"Specifies the type of integration between the third-party service and the Atmosphere IoT API.\n\nExecutes all Device Event elements that have the integration type specified by \nthe project found with the supplied `projectUuid` query parameter.\n","schema":{"type":"string","enum":["custom","ble","lora","sigfox","zigbee"],"description":"The integration type, case-insensitive."}},{"in":"query","name":"organizationId","allowReserved":true,"description":"Specifies the organizationId of the organization to provision the device into.\n\nIf the organizationId is not provided, the API will fall back to the user's organization\nthat is resolved from providing the Authorization or api_auth_token headers.\n\nThe organization must be accessible by the user initiating the integration request, \ndevices cannot be provisioned in an organization above the user's.\n","schema":{"type":"string","example":"6205319c51ccf761dfb9a0be"}},{"in":"query","name":"eventsRef","allowReserved":true,"description":"**JSONPath JavaScript evaluations are not allowed.**\n\n**If this query parameter not provided, the entire request body is parsed by the API.**\n\nString or [JSONPath](https://goessner.net/articles/JsonPath) expression that will be used\nto break up the request body into an array, from which the `deviceTag` query parameter's values\nwill be deduced. \n\nIf not provided, the entire request body is treated as a single Device Event.\n\nSuppose the following request body needs to be split up into separate payloads of data under\nthe `sensorMessages` array, such that multiple Device Events are parsed for distinct devices in one request.\n\nNotice how each entry contains a distinct `sensorID`:\n```\n{\n    \"gatewayMessage\": {\n        \"gatewayID\": \"10000\",\n        \"gatewayName\": \"ExampleGateway\",\n        \"accountID\": \"xxxx\",\n        \"networkID\": \"xxxx\",\n        \"messageType\": \"0\",\n        \"power\": \"0\",\n        \"batteryLevel\": \"101\",\n        \"date\": \"6/18/2016 7:39:01 PM\",\n        \"count\": \"3\",\n        \"signalStrength\": \"29\",\n        \"pendingChange\": \"False\"\n    },\n    \"sensorMessages\": [\n        {\n        \"sensorID\": \"10001\",\n        \"sensorName\": \"Temp1\",\n        \"applicationID\": \"6E2F41EC-C7CC-49D7-AE78-D28366412347\",\n        \"networkID\": \"xxxx\",\n        \"dataMessageGUID\": \"78642056-CBD8-43B0-9A4B-247E58D3B6CB\",\n        \"state\": \"0\",\n        \"messageDate\": \"6/18/2016 7:37:48 PM\",\n        \"rawData\": \"23.7\",\n        \"dataType\": \"TemperatureData\",\n        \"dataValue\": \"23.7\",\n        \"plotValues\": \"74.66\",\n        \"plotLabels\": \"Fahrenheit\",\n        \"batteryLevel\": \"100\",\n        \"signalStrength\": \"100\",\n        \"pendingChange\": \"False\",\n        \"voltage\": \"3.24\"\n        },\n        {\n        \"sensorID\": \"99981\",\n        \"sensorName\": \"Temp2\",\n        \"applicationID\": \"766EA665-D121-433C-8AF7-014FA0A389EF\",\n        \"networkID\": \"xxxx\",\n        \"dataMessageGUID\": \"30041B9F-A8F4-404E-9FDC-48A83BA017A1\",\n        \"state\": \"0\",\n        \"messageDate\": \"6/19/2018 8:37:48 PM\",\n        \"rawData\": \"62.4\",\n        \"dataType\": \"TemperatureData\",\n        \"dataValue\": \"62.4\",\n        \"plotValues\": \"66.74\",\n        \"plotLabels\": \"Fahrenheit\",\n        \"batteryLevel\": \"78\",\n        \"signalStrength\": \"22\",\n        \"pendingChange\": \"True\",\n        \"voltage\": \"3.48\"\n        }\n    ]\n}\n```\n\nIn order to separate each event, a JSONPath expression of `$.sensorMessages[*]`\ncan be passed to yield the following:\n```\n[\n    {\n        \"sensorID\": \"10001\",\n        \"sensorName\": \"Temp1\",\n        \"applicationID\": \"2\",\n        \"networkID\": \"xxxx\",\n        \"dataMessageGUID\": \"78642056-CBD8-43B0-9A4B-247E58D3B6CB\",\n        \"state\": \"0\",\n        \"messageDate\": \"6/18/2016 7:37:48 PM\",\n        \"rawData\": \"23.7\",\n        \"dataType\": \"TemperatureData\",\n        \"dataValue\": \"23.7\",\n        \"plotValues\": \"74.66\",\n        \"plotLabels\": \"Fahrenheit\",\n        \"batteryLevel\": \"100\",\n        \"signalStrength\": \"100\",\n        \"pendingChange\": \"False\",\n        \"voltage\": \"3.24\"\n    },\n    {\n        \"sensorID\": \"99981\",\n        \"sensorName\": \"Temp2\",\n        \"applicationID\": \"5\",\n        \"networkID\": \"xxxx\",\n        \"dataMessageGUID\": \"30041B9F-A8F4-404E-9FDC-48A83BA017A1\",\n        \"state\": \"0\",\n        \"messageDate\": \"6/19/2018 8:37:48 PM\",\n        \"rawData\": \"62.4\",\n        \"dataType\": \"TemperatureData\",\n        \"dataValue\": \"62.4\",\n        \"plotValues\": \"66.74\",\n        \"plotLabels\": \"Fahrenheit\",\n        \"batteryLevel\": \"78\",\n        \"signalStrength\": \"22\",\n        \"pendingChange\": \"True\",\n        \"voltage\": \"3.48\"\n    }\n]\n```\n\nOnce parsed with the `eventsRef` query parameter, the `deviceTagValueRef` \nand `projectUuidMapRef` parameters will operate on each element of this array. \n\nThis will extract the individual `deviceTag` query parameter values to be assigned to the device(s) metadata fields. \n\nThe array generated by `projectUuidMapRef` will be used to find values in the provided `projectUuidMap`.\nThis will determine which devices will be provisioned to which `projectUuid` if auto-provisioning is necessary.\n\nThe supplied `projectUuid` query parameter will specify the project that the device(s) will be provisioned against.\n\nIf devices do not already exist with the metadata tag of the provided `deviceTag` query parameter, \nthen they will be automatically provisioned under the organization of the user making the request.\n","schema":{"type":"string"},"examples":{"JSONPath":{"value":"$.sensorMessages[*]","summary":"JSONPath expression to \"split\" the request body as described in the provided example. The split entries are referred to as Event Blocks."},"string":{"value":"sensorMessages","summary":"String can be used to refer to a top-level property of an object in the request body."}}},{"in":"query","name":"deviceTag","description":"**User-defined label** for the values resolved by the `deviceTagValue` or `deviceTagValueRef` query parameters on\non the device's metadata object like so: `{ deviceTag: deviceTagValue }` \n\nThis is stored on the device metadata, then used to look up the device when the request is posted to the API.\nIf the device is not found, it will be automatically provisioned with the `deviceTag` and `deviceTagValue` as described above.\n","schema":{"type":"string","description":"Label for the resolved value in the device metadata.","example":"fooId"}},{"in":"query","name":"deviceTagValue","allowReserved":true,"description":"Provides Atmosphere IoT the ID of the device on the third-party-integration service. \n\nCan be used directly to find the device in tandem with the `deviceTag`, or to\nassign it during the auto-provisioning process on Atmosphere IoT.\n","schema":{"type":"string","description":"ID to query on the Atmosphere IoT side.","example":"sensorID"}},{"in":"query","name":"deviceTagValueRef","allowReserved":true,"description":"**JSONPath JavaScript evaluations are not allowed.**\n\nMeans by which the API will find the individual values to be stored in the device metadata under the key specified by\nthe `deviceTag` query parameter. \n\nA [JSONPath Expression](https://goessner.net/articles/JsonPath/) or string can be used to filter out the \nappropriate key in the body. If the `eventsRef` query parameter is provided, then this parameter will be used\nagainst the resolved data structure filtered from the request body by the `eventsRef` JSONPath expression.\n","schema":{"type":"string","description":"String or JSONPath expression that will find the integration ID.\n"},"examples":{"JSONPath":{"value":"$.sensorID","summary":"JSONPath expression to identify the values that that will be mapped to the `deviceTag` in the metadata of the device(s) from the payloads generated by `eventsRef`."},"string":{"value":"sensorID","summary":"String to refer to a top-level property of an object in the `eventsRef` payloads."}}},{"in":"query","name":"extraMeta","allowReserved":true,"description":"**Needs to be URI Encoded.**\n\nJSON that stores additional metadata that will be assigned to the device \nwhen it auto-provisions itself on the Atmosphere IoT platform.\n\nDoes not overwrite metadata that already exists on the device(s).\n","schema":{"type":"object","description":"Additional device metadata to store after provisioning completes.","example":{"foo1":"bar1","foo2":"bar2"}}},{"in":"query","name":"extraMetaMapRefs","allowReserved":true,"description":"**Needs to be URI Encoded.**\n\nJSON Mapping that allows the consumer to assign additional metadata fields to the device when a request is sent to the integration API.\nEach key in the mapping is a label for the key-value pair that will be added to the device's metadata.\n\nEach value is a JSONPath expression that matches fields in the body of the request sent to the API.\n\nThe example provided will yield a custom metadata object that contains an Equipment ID and Lora Device EUI:\n{ 'Equipment ID': '$.end_device_ids.device_id',  'loraDevEUI': '$.end_device_ids.device_id'}\n\nThis parameter will not erase existing device metadata!\n","schema":{"type":"object","nullable":true,"additionalProperties":true,"description":"Mapping of metadata key-value pairs to request body that will be added to the device metadata.","example":{"Equipment ID":"$.end_device_ids.device_id","loraDevEUI":"$.end_device_ids.device_id"}}},{"in":"query","name":"projectUuid","description":"The identifier for the Project that will be used when auto-provisioning the device.\n\nTo determine how the Project will respond to Device Events sent over this endpoint, contact the Technicians and \nAdministrators belonging to your Organization for more details if you do not have access to the Project.\n","schema":{"type":"string","description":"Project UUID of an Atmosphere IoT Project in studio.","example":"2bcb4d97-09b8-4f2f-a7e2-a92701477dcf"}},{"in":"query","name":"projectUuidMap","allowReserved":true,"description":"**Needs to be URI Encoded.**\n\nJSON Mapping where each key is a key in the data structure resolved from the `projectUuidMapRef` JSONPath evaluation.\n\nFor example, the `projectUuidMapRef` query parameter looks at the `applicationID` field for each event by passing \n`$.applicationID`. \n\nThe values for each `applicationID` are searched in the mapping. If a `projectUuid` is found, it will\nbe used to provision the device if auto-provisioning is necessary.\n","schema":{"type":"object","description":"Mapping of values to `projectUuid`'s. Used for auto-provisioning.","example":{"6E2F41EC-C7CC-49D7-AE78-D28366412347":"62f0fd4c-b3d9-4453-baa5-7ccde5f58366","766EA665-D121-433C-8AF7-014FA0A389EF":"39916f9a-e781-447c-afd6-930a8a359888"}}},{"in":"query","name":"projectUuidMapRef","allowReserved":true,"description":"**JSONPath JavaScript evaluations are not allowed.**\n\nJSONPath expression to extract values from the array generated by the `eventsRef` query parameter \nfor the provided `projectUuidMap`. \n\nWhen a resolved value matches an entry in `projectUuidMap`, the matched `projectUuid` will be used\nto autoprovision the device if it has not been created yet.\n","schema":{"type":"string","description":"JSONPath expression to find the values that will be mapped to `projectUuid`'s.","example":"$.applicationID"}},{"in":"query","name":"eventPayloadMapRefs","allowReserved":true,"description":"**Needs to be URI Encoded.**\n\nJSON Mapping that allows the consumer to construct a custom object to be processed as a Device Event.\nEach key in the mapping corresponds to a key in the custom object. \n\nEach value is a JSONPath expression that matches fields in the Event Block that contains the payload.\nEvent blocks are created by passing the eventsRef parameter. If not provided, the API assumes that one Event Block has been created.\n\nThe example provided will yield a custom payload object as such for the first Event Block:\n{ rawData: 23.7,  timestamp: 6/18/2016 7:37:48 PM}\n","schema":{"type":"object","nullable":true,"additionalProperties":true,"description":"Mapping of values to custom payload object.","example":{"rawData":"$.rawData","timestamp":"$.messageDate"}}},{"in":"query","name":"debug","description":"When set to true, a 200 response is sent with information regarding the\nprocessing of the request from the third-party integration.\n\nIncludes the data identified with the provided JSONPath expressions for \nthe `eventsRef` and `deviceTagValueRef` query parameters that were passed, \nand if any devices were provisioned in the process.\n","schema":{"type":"string","description":"Flag to provide debug output.","example":true}},{"in":"header","name":"integration","description":"Specifies the type of integration between the third-party service and the Atmosphere IoT API.\n\nExecutes all Device Event elements that have the integration type specified by \nthe project found with the supplied `projectUuid` header parameter.\n","schema":{"type":"string","enum":["custom","ble","lora","sigfox","zigbee"],"description":"The integration type, case-insensitive."}},{"in":"header","name":"organizationId","allowReserved":true,"description":"Specifies the organizationId of the organization to provision the device into.\n\nIf the organizationId is not provided, the API will fall back to the user's organization\nthat is resolved from providing the Authorization or api_auth_token headers.\n\nThe organization must be accessible by the user initiating the integration request, \ndevices cannot be provisioned in an organization above the user's.\n","schema":{"type":"string","example":"6205319c51ccf761dfb9a0be"}},{"in":"header","name":"eventsRef","allowReserved":true,"description":"**JSONPath JavaScript evaluations are not allowed.**\n\n**If this header parameter not provided, the entire request body is parsed by the API.**\n\nString or [JSONPath](https://goessner.net/articles/JsonPath) expression that will be used\nto break up the request body into an array, from which the `deviceTag` header parameter's values\nwill be deduced. \n\nIf not provided, the entire request body is treated as a single Device Event.\n\nSuppose the following request body needs to be split up into separate payloads of data under\nthe `sensorMessages` array, such that multiple Device Events are parsed for distinct devices in one request.\n\nNotice how each entry contains a distinct `sensorID`:\n```\n{\n    \"gatewayMessage\": {\n        \"gatewayID\": \"10000\",\n        \"gatewayName\": \"ExampleGateway\",\n        \"accountID\": \"xxxx\",\n        \"networkID\": \"xxxx\",\n        \"messageType\": \"0\",\n        \"power\": \"0\",\n        \"batteryLevel\": \"101\",\n        \"date\": \"6/18/2016 7:39:01 PM\",\n        \"count\": \"3\",\n        \"signalStrength\": \"29\",\n        \"pendingChange\": \"False\"\n    },\n    \"sensorMessages\": [\n        {\n        \"sensorID\": \"10001\",\n        \"sensorName\": \"Temp1\",\n        \"applicationID\": \"6E2F41EC-C7CC-49D7-AE78-D28366412347\",\n        \"networkID\": \"xxxx\",\n        \"dataMessageGUID\": \"78642056-CBD8-43B0-9A4B-247E58D3B6CB\",\n        \"state\": \"0\",\n        \"messageDate\": \"6/18/2016 7:37:48 PM\",\n        \"rawData\": \"23.7\",\n        \"dataType\": \"TemperatureData\",\n        \"dataValue\": \"23.7\",\n        \"plotValues\": \"74.66\",\n        \"plotLabels\": \"Fahrenheit\",\n        \"batteryLevel\": \"100\",\n        \"signalStrength\": \"100\",\n        \"pendingChange\": \"False\",\n        \"voltage\": \"3.24\"\n        },\n        {\n        \"sensorID\": \"99981\",\n        \"sensorName\": \"Temp2\",\n        \"applicationID\": \"766EA665-D121-433C-8AF7-014FA0A389EF\",\n        \"networkID\": \"xxxx\",\n        \"dataMessageGUID\": \"30041B9F-A8F4-404E-9FDC-48A83BA017A1\",\n        \"state\": \"0\",\n        \"messageDate\": \"6/19/2018 8:37:48 PM\",\n        \"rawData\": \"62.4\",\n        \"dataType\": \"TemperatureData\",\n        \"dataValue\": \"62.4\",\n        \"plotValues\": \"66.74\",\n        \"plotLabels\": \"Fahrenheit\",\n        \"batteryLevel\": \"78\",\n        \"signalStrength\": \"22\",\n        \"pendingChange\": \"True\",\n        \"voltage\": \"3.48\"\n        }\n    ]\n}\n```\n\nIn order to separate each event, a JSONPath expression of `$.sensorMessages[*]`\ncan be passed to yield the following:\n```\n[\n    {\n        \"sensorID\": \"10001\",\n        \"sensorName\": \"Temp1\",\n        \"applicationID\": \"2\",\n        \"networkID\": \"xxxx\",\n        \"dataMessageGUID\": \"78642056-CBD8-43B0-9A4B-247E58D3B6CB\",\n        \"state\": \"0\",\n        \"messageDate\": \"6/18/2016 7:37:48 PM\",\n        \"rawData\": \"23.7\",\n        \"dataType\": \"TemperatureData\",\n        \"dataValue\": \"23.7\",\n        \"plotValues\": \"74.66\",\n        \"plotLabels\": \"Fahrenheit\",\n        \"batteryLevel\": \"100\",\n        \"signalStrength\": \"100\",\n        \"pendingChange\": \"False\",\n        \"voltage\": \"3.24\"\n    },\n    {\n        \"sensorID\": \"99981\",\n        \"sensorName\": \"Temp2\",\n        \"applicationID\": \"5\",\n        \"networkID\": \"xxxx\",\n        \"dataMessageGUID\": \"30041B9F-A8F4-404E-9FDC-48A83BA017A1\",\n        \"state\": \"0\",\n        \"messageDate\": \"6/19/2018 8:37:48 PM\",\n        \"rawData\": \"62.4\",\n        \"dataType\": \"TemperatureData\",\n        \"dataValue\": \"62.4\",\n        \"plotValues\": \"66.74\",\n        \"plotLabels\": \"Fahrenheit\",\n        \"batteryLevel\": \"78\",\n        \"signalStrength\": \"22\",\n        \"pendingChange\": \"True\",\n        \"voltage\": \"3.48\"\n    }\n]\n```\n\nOnce parsed with the `eventsRef` header parameter, the `deviceTagValueRef` \nand `projectUuidMapRef` parameters will operate on each element of this array. \n\nThis will extract the individual `deviceTag` header parameter values to be assigned to the device(s) metadata fields. \n\nThe array generated by `projectUuidMapRef` will be used to find values in the provided `projectUuidMap`.\nThis will determine which devices will be provisioned to which `projectUuid` if auto-provisioning is necessary.\n\nThe supplied `projectUuid` header parameter will specify the project that the device(s) will be provisioned against.\n\nIf devices do not already exist with the metadata tag of the provided `deviceTag` header parameter, \nthen they will be automatically provisioned under the organization of the user making the request.\n","schema":{"type":"string"},"examples":{"JSONPath":{"value":"$.sensorMessages[*]","summary":"JSONPath expression to \"split\" the request body as described in the provided example. The split entries are referred to as Event Blocks."},"string":{"value":"sensorMessages","summary":"String can be used to refer to a top-level property of an object in the request body."}}},{"in":"header","name":"deviceTag","description":"**User-defined label** for the values resolved by the `deviceTagValue` or `deviceTagValueRef` header parameters on\non the device's metadata object like so: `{ deviceTag: deviceTagValue }` \n\nThis is stored on the device metadata, then used to look up the device when the request is posted to the API.\nIf the device is not found, it will be automatically provisioned with the `deviceTag` and `deviceTagValue` as described above.\n","schema":{"type":"string","description":"Label for the resolved value in the device metadata.","example":"fooId"}},{"in":"header","name":"deviceTagValue","allowReserved":true,"description":"Provides Atmosphere IoT the ID of the device on the third-party-integration service. \n\nCan be used directly to find the device in tandem with the `deviceTag`, or to\nassign it during the auto-provisioning process on Atmosphere IoT.\n","schema":{"type":"string","description":"ID to header on the Atmosphere IoT side.","example":"sensorID"}},{"in":"header","name":"deviceTagValueRef","allowReserved":true,"description":"**JSONPath JavaScript evaluations are not allowed.**\n\nMeans by which the API will find the individual values to be stored in the device metadata under the key specified by\nthe `deviceTag` header parameter. \n\nA [JSONPath Expression](https://goessner.net/articles/JsonPath/) or string can be used to filter out the \nappropriate key in the body. If the `eventsRef` header parameter is provided, then this parameter will be used\nagainst the resolved data structure filtered from the request body by the `eventsRef` JSONPath expression.\n","schema":{"type":"string","description":"String or JSONPath expression that will find the integration ID.\n"},"examples":{"JSONPath":{"value":"$.sensorID","summary":"JSONPath expression to identify the values that that will be mapped to the `deviceTag` in the metadata of the device(s) from the payloads generated by `eventsRef`."},"string":{"value":"sensorID","summary":"String to refer to a top-level property of an object in the `eventsRef` payloads."}}},{"in":"header","name":"extraMeta","allowReserved":true,"description":"**Needs to be URI Encoded.**\n\nJSON that stores additional metadata that will be assigned to the device \nwhen it auto-provisions itself on the Atmosphere IoT platform.\n\nDoes not overwrite metadata that already exists on the device(s).\n","schema":{"type":"object","description":"Additional device metadata to store after provisioning completes.","example":{"foo1":"bar1","foo2":"bar2"}}},{"in":"header","name":"extraMetaMapRefs","allowReserved":true,"description":"**Needs to be URI Encoded.**\n\nJSON Mapping that allows the consumer to assign additional metadata fields to the device when a request is sent to the integration API.\nEach key in the mapping is a label for the key-value pair that will be added to the device's metadata. \n\nEach value is a JSONPath expression that matches fields in the body of the request sent to the API.\n\nThe example provided will yield a custom metadata object that contains an Equipment ID and Lora Device EUI:\n{ 'Equipment ID': '$.end_device_ids.device_id',  'loraDevEUI': '$.end_device_ids.device_id'}\n\nThis parameter will not erase existing device metadata!\n","schema":{"anyOf":[{"type":"string","nullable":true},{"type":"object","nullable":true,"additionalProperties":true}],"description":"Mapping of metadata key-value pairs to request body that will be added to the devie metadata.","example":{"Equipment ID":"$.end_device_ids.device_id","loraDevEUI":"$.end_device_ids.device_id"}}},{"in":"header","name":"projectUuid","description":"The identifier for the Project that will be used when auto-provisioning the device.\n\nTo determine how the Project will respond to Device Events sent over this endpoint, contact the Technicians and \nAdministrators belonging to your Organization for more details if you do not have access to the Project.\n","schema":{"type":"string","description":"Project UUID of an Atmosphere IoT Project in studio.","example":"2bcb4d97-09b8-4f2f-a7e2-a92701477dcf"}},{"in":"header","name":"projectUuidMap","allowReserved":true,"description":"**Needs to be URI Encoded.**\n\nJSON Mapping where each key is a key in the data structure resolved from the `projectUuidMapRef` JSONPath evaluation.\n\nFor example, the `projectUuidMapRef` header parameter looks at the `applicationID` field for each event by passing \n`$.applicationID`. \n\nThe values for each `applicationID` are searched in the mapping. If a `projectUuid` is found, it will\nbe used to provision the device if auto-provisioning is necessary.\n","schema":{"type":"object","description":"Mapping of values to `projectUuid`'s. Used for auto-provisioning.","example":{"6E2F41EC-C7CC-49D7-AE78-D28366412347":"62f0fd4c-b3d9-4453-baa5-7ccde5f58366","766EA665-D121-433C-8AF7-014FA0A389EF":"39916f9a-e781-447c-afd6-930a8a359888"}}},{"in":"header","name":"projectUuidMapRef","allowReserved":true,"description":"**JSONPath JavaScript evaluations are not allowed.**\n\nJSONPath expression to extract values from the array generated by the `eventsRef` header parameter \nfor the provided `projectUuidMap`. \n\nWhen a resolved value matches an entry in `projectUuidMap`, the matched `projectUuid` will be used\nto autoprovision the device if it has not been created yet.\n","schema":{"type":"string","description":"JSONPath expression to find the values that will be mapped to `projectUuid`'s.","example":"$.applicationID"}},{"in":"header","name":"eventPayloadMapRefs","allowReserved":true,"description":"**Needs to be URI Encoded.**\n\nJSON Mapping that allows the consumer to construct a custom object to be processed as a Device Event.\nEach key in the mapping corresponds to a key in the custom object. \n\nEach value is a JSONPath expression that matches fields in the Event Block that contains the payload.\nEvent blocks are created by passing the eventsRef parameter. If not provided, the API assumes that one Event Block has been created.\n\nThe example provided will yield a custom payload object as such for the first Event Block:\n{ rawData: 23.7,  timestamp: 6/18/2016 7:37:48 PM}\n","schema":{"anyOf":[{"type":"string","nullable":true},{"type":"object","nullable":true,"additionalProperties":true}],"description":"Mapping of values to custom payload object.","example":{"rawData":"$.rawData","timestamp":"$.messageDate"}}},{"in":"header","name":"debug","description":"When set to true, a 200 response is sent with information regarding the\nprocessing of the request from the third-party integration.\n\nIncludes the data identified with the provided JSONPath expressions for \nthe `eventsRef` and `deviceTagValueRef` header parameters that were passed, \nand if any devices were provisioned in the process.\n","schema":{"type":"string","description":"Flag to provide debug output.","example":true}}],"requestBody":{"description":"Third-party event webhook / HTTP payload.","required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"string","nullable":true},{"type":"object","additionalProperties":true,"nullable":true},{"type":"integer","nullable":true},{"type":"number","nullable":true},{"type":"boolean","nullable":true},{"type":"array","nullable":true}],"example":{"gatewayMessage":{"gatewayID":"10000","gatewayName":"ExampleGateway","accountID":"xxxx","networkID":"xxxx","messageType":"0","power":"0","batteryLevel":"101","date":"6/18/2016 7:39:01 PM","count":"3","signalStrength":"29","pendingChange":"False"},"sensorMessages":[{"sensorID":"10001","sensorName":"Temp1","applicationID":"6E2F41EC-C7CC-49D7-AE78-D28366412347","networkID":"xxxx","dataMessageGUID":"78642056-CBD8-43B0-9A4B-247E58D3B6CB","state":"0","messageDate":"6/18/2016 7:37:48 PM","rawData":"23.7","dataType":"TemperatureData","dataValue":"23.7","plotValues":"74.66","plotLabels":"Fahrenheit","batteryLevel":"100","signalStrength":"100","pendingChange":"False","voltage":"3.24"},{"sensorID":"99981","sensorName":"Temp2","applicationID":"766EA665-D121-433C-8AF7-014FA0A389EF","networkID":"xxxx","dataMessageGUID":"30041B9F-A8F4-404E-9FDC-48A83BA017A1","state":"0","messageDate":"6/19/2018 8:37:48 PM","rawData":"62.4","dataType":"TemperatureData","dataValue":"62.4","plotValues":"66.74","plotLabels":"Fahrenheit","batteryLevel":"78","signalStrength":"22","pendingChange":"True","voltage":"3.48"}]}}}}},"responses":{"200":{"description":"successful operation, returned if debug flag is set","content":{"application/json":{"schema":{"type":"object","example":{"debug":{"errors":[{"message":"Device validation failed: projectUuid: Path `projectUuid` is required."}],"extractedTasks":{"requestBody":{"gatewayMessage":{"gatewayID":"10000","gatewayName":"ExampleGateway","accountID":"xxxx","networkID":"xxxx","messageType":"0","power":"0","batteryLevel":"101","date":"6/18/2016 7:39:01 PM","count":"3","signalStrength":"29","pendingChange":"False"},"sensorMessages":[{"sensorID":"10001","sensorName":"Temp1","applicationID":"2","networkID":"xxxx","dataMessageGUID":"78642056-CBD8-43B0-9A4B-247E58D3B6CB","state":"0","messageDate":"6/18/2016 7:37:48 PM","rawData":"23.7","dataType":"TemperatureData","dataValue":"23.7","plotValues":"74.66","plotLabels":"Fahrenheit","batteryLevel":"100","signalStrength":"100","pendingChange":"False","voltage":"3.24"},{"sensorID":"99981","sensorName":"Sonic2","applicationID":"67","networkID":"xxxx","dataMessageGUID":"30041B9F-A8F4-404E-9FDC-48A83BA017A1","state":"0","messageDate":"6/19/2018 8:37:48 PM","rawData":"62.4","dataType":"SonicData","dataValue":"62.4","plotValues":"66.74","plotLabels":"SonicUnits","batteryLevel":"78","signalStrength":"22","pendingChange":"True","voltage":"3.48"}]},"tasks":[{"deviceTag":"iMonnitID","extraMeta":{"serialNumber":"123456789","state":"READY"},"integration":"custom","payloads":[{"gatewayMessage":{"gatewayID":"10000","gatewayName":"ExampleGateway","accountID":"xxxx","networkID":"xxxx","messageType":"0","power":"0","batteryLevel":"101","date":"6/18/2016 7:39:01 PM","count":"3","signalStrength":"29","pendingChange":"False"},"sensorMessages":[{"sensorID":"10001","sensorName":"Temp1","applicationID":"2","networkID":"xxxx","dataMessageGUID":"78642056-CBD8-43B0-9A4B-247E58D3B6CB","state":"0","messageDate":"6/18/2016 7:37:48 PM","rawData":"23.7","dataType":"TemperatureData","dataValue":"23.7","plotValues":"74.66","plotLabels":"Fahrenheit","batteryLevel":"100","signalStrength":"100","pendingChange":"False","voltage":"3.24"},{"sensorID":"99981","sensorName":"Sonic2","applicationID":"67","networkID":"xxxx","dataMessageGUID":"30041B9F-A8F4-404E-9FDC-48A83BA017A1","state":"0","messageDate":"6/19/2018 8:37:48 PM","rawData":"62.4","dataType":"SonicData","dataValue":"62.4","plotValues":"66.74","plotLabels":"SonicUnits","batteryLevel":"78","signalStrength":"22","pendingChange":"True","voltage":"3.48"}]}],"organization":"60f9d662f0f3ca6e8a39bd76","owner":"Abdul.Kareem00221","deviceTagValue":"IoTServiceId","projectUuid":"c6717835-4adf-493e-b7ba-ec6616c0a43d"}],"errors":[{"message":"Device validation failed: projectUuid: Path `projectUuid` is required."}]},"taskExecutions":{"processed":[{"errors":[{"message":"Device validation failed: projectUuid: Path `projectUuid` is required."}],"devicesProvisioned":[{"deviceId":"60f9d664f0f3ca6e8a39bdd3","name":"IoTServiceId 1112234455","organizationId":"60f9d662f0f3ca6e8a39bd76","projectUuid":"c6717835-4adf-493e-b7ba-ec6616c0a43d","deviceTag":"IoTServiceId","deviceTagValue":"1112234455"}],"eventsProcessed":[{"_id":"60f9d664f0f3ca6e8a39bdd6","receivedAt":"2021-07-22T20:34:44.878Z","integration":"custom","deviceId":"60f9d664f0f3ca6e8a39bdd3","payload":{"gatewayMessage":{"gatewayID":"10000","gatewayName":"ExampleGateway","accountID":"xxxx","networkID":"xxxx","messageType":"0","power":"0","batteryLevel":"101","date":"6/18/2016 7:39:01 PM","count":"3","signalStrength":"29","pendingChange":"False"},"sensorMessages":[{"sensorID":"10001","sensorName":"Temp1","applicationID":"2","networkID":"xxxx","dataMessageGUID":"78642056-CBD8-43B0-9A4B-247E58D3B6CB","state":"0","messageDate":"6/18/2016 7:37:48 PM","rawData":"23.7","dataType":"TemperatureData","dataValue":"23.7","plotValues":"74.66","plotLabels":"Fahrenheit","batteryLevel":"100","signalStrength":"100","pendingChange":"False","voltage":"3.24"},{"sensorID":"99981","sensorName":"Sonic2","applicationID":"67","networkID":"xxxx","dataMessageGUID":"30041B9F-A8F4-404E-9FDC-48A83BA017A1","state":"0","messageDate":"6/19/2018 8:37:48 PM","rawData":"62.4","dataType":"SonicData","dataValue":"62.4","plotValues":"66.74","plotLabels":"SonicUnits","batteryLevel":"78","signalStrength":"22","pendingChange":"True","voltage":"3.48"}]}}]}],"errors":[{"message":"Device validation failed: projectUuid: Path `projectUuid` is required."}]}}}}}}},"201":{"description":"successful operation"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/notifications":{"get":{"tags":["notifications"],"summary":"Fetches notifications according to the parameters given.\n","description":"Fetches notifications according to the parameters given.\n","operationId":"getNotifications","x-eov-operation-id":"index","x-eov-operation-handler":"notifications","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"name":"unread","in":"query","description":"Show only unread notifications","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notifications"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}},"post":{"tags":["notifications"],"summary":"Emit system-wide notification.","description":"Emits a system notification, which every user on the platform will get.","operationId":"createSystemNotification","x-eov-operation-id":"create","x-eov-operation-handler":"notifications","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"A system notification is similar to a Notification, but contains less properties.\n","properties":{"message":{"type":"string","minLength":1}},"example":{"message":"Here is my message text"}}}}},"responses":{"204":{"description":"System notification emitted successfully."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}},"patch":{"tags":["notifications"],"description":"Updates all notifications","summary":"Update all notifications","operationId":"updateNotifications","x-eov-operation-id":"patchMany","x-eov-operation-handler":"notifications","parameters":[{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/toRequired"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"read":{"type":"boolean"}}}}}},"responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["notifications"],"description":"Deletes all notifications","summary":"Delete all notifications","operationId":"deleteNotifications","x-eov-operation-id":"destroyMany","x-eov-operation-handler":"notifications","parameters":[{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/toRequired"}],"responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/notifications/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["notifications"],"summary":"Fetch a single notification","description":"Returns the notification with the specified ID.","operationId":"getNotification","x-eov-operation-id":"show","x-eov-operation-handler":"notifications","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["notifications"],"summary":"Update a notification","description":"Updates the notification with the specified ID","operationId":"updateNotification","x-eov-operation-id":"patch","x-eov-operation-handler":"notifications","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"read":{"type":"boolean"}}}}}},"responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["notifications"],"summary":"Delete a notification","description":"Deletes the notification with the specified ID.","operationId":"deleteNotification","x-eov-operation-id":"destroy","x-eov-operation-handler":"notifications","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/organizations":{"get":{"tags":["organizations"],"summary":"Fetch all organizations","description":"Fetches organizations according to the parameters given.\n\nSupported sort fields:\n* name (default)\n* description\n* createdAt\n* updatedAt\n","operationId":"getOrganizations","x-eov-operation-id":"index","x-eov-operation-handler":"organizations","parameters":[{"$ref":"#/components/parameters/depth"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/parentOrganizationId"},{"$ref":"#/components/parameters/searchText"},{"$ref":"#/components/parameters/sortBy"}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organizations"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}},"post":{"tags":["organizations"],"summary":"Create a new organization","description":"Creates new organization, returns the organization","operationId":"postOrganizations","x-eov-operation-id":"create","x-eov-operation-handler":"organizations","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"responses":{"201":{"description":"Organization created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/organizations/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["organizations"],"summary":"Fetch an organization","description":"Returns the organization with the specified ID.","operationId":"getOrganization","x-eov-operation-id":"show","x-eov-operation-handler":"organizations","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"links":{"GetUserByOrgId":{"operationId":"getUsers","parameters":{"organizationId":"$response.body#/id"},"description":"Retrieve the list of users accessible by this Organization ID."}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"tags":["organizations"],"summary":"Update an organization","description":"Updates the organization with the specified ID and returns the updated version.","operationId":"updateOrganization","x-eov-operation-id":"update","x-eov-operation-handler":"organizations","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["organizations"],"summary":"Delete an organization","description":"Deletes the organization with the specified ID.","operationId":"deleteOrganization","x-eov-operation-id":"destroy","x-eov-operation-handler":"organizations","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/organizations/{id}/branding":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["organizations"],"summary":"Fetch an organization's branding.","description":"Returns the organization branding.","operationId":"getBranding","x-eov-operation-id":"show","x-eov-operation-handler":"organizationBrandings","responses":{"200":{"description":"Organization Branding information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationBranding"}}}},"404":{"$ref":"#/components/responses/Error"}}},"put":{"tags":["organizations"],"summary":"Update an Organization's branding","description":"Updates the organization branding for the specified organization ID and returns the branding information.","operationId":"updateBranding","x-eov-operation-id":"update","x-eov-operation-handler":"organizationBrandings","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationBranding"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationBranding"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["organizations"],"summary":"Clear an Organization's branding","description":"Clears the organization dashboard for the specified organization ID.","operationId":"deleteBranding","x-eov-operation-id":"destroy","x-eov-operation-handler":"organizationBrandings","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/organizations/{id}/image":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["organizations"],"summary":"Fetch an organization's image","description":"Returns the organization image","operationId":"getOrganizationImage","x-eov-operation-id":"show","x-eov-operation-handler":"organizationImage","responses":{"200":{"description":"Organization Image","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Image"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["organizations"],"summary":"Update a Organization's image","description":"Updates the image for the specified ID.","operationId":"updateOrganizationImage","x-eov-operation-id":"create","x-eov-operation-handler":"organizationImage","requestBody":{"required":true,"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Image"}}}},"responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["organizations"],"summary":"Delete an Organization's set image","description":"Deletes the image set set for the specified ID.","operationId":"deleteOrganizationImage","x-eov-operation-id":"destroy","x-eov-operation-handler":"organizationImage","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/organizations/{id}/dashboard":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["organizations"],"summary":"Fetch an organization's dashboard","description":"Returns the organization dashboard","operationId":"getDashboard","x-eov-operation-id":"index","x-eov-operation-handler":"organizationDashboard","responses":{"200":{"description":"Organization Dashboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"404":{"$ref":"#/components/responses/Error"}}},"put":{"tags":["organizations"],"summary":"Update an Organization's dashboard","description":"Updates the organization dashboard for the specified organization ID and returns the dashboard.","operationId":"updateDashboard","x-eov-operation-id":"update","x-eov-operation-handler":"organizationDashboard","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["organizations"],"summary":"Delete an Organization's dashboard","description":"Deletes the organization dashboard for the specified organization ID.","operationId":"deleteDashboard","x-eov-operation-id":"destroy","x-eov-operation-handler":"organizationDashboard","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/organizations/{id}/devicetable":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["organizations"],"summary":"Fetch an organization's device table configurations","description":"Returns the organization device table configurations","operationId":"getDeviceTableConfigs","x-eov-operation-id":"show","x-eov-operation-handler":"organizationDeviceTableConfig","responses":{"200":{"description":"Organization device table configurations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTableConfig"}}}},"404":{"$ref":"#/components/responses/Error"}}},"put":{"tags":["organizations"],"summary":"Update an Organization's device table configurations","description":"Updates the organization device table configurations for the specified organization ID and returns them.","operationId":"updateDeviceTableConfigs","x-eov-operation-id":"update","x-eov-operation-handler":"organizationDeviceTableConfig","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTableConfig"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTableConfig"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["organizations"],"summary":"Delete an Organization's device table configurations","description":"Deletes the device table configurations for the organization by ID.","operationId":"deleteDeviceTableConfigs","x-eov-operation-id":"destroy","x-eov-operation-handler":"organizationDeviceTableConfig","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/organizations/{id}/usage":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["organizations"],"summary":"Fetch an an organization, while also returning the organization's total data usage and device usage on the platform.","description":"Returns the organization usage data. Also includes the data usage of the organizations underneath.","operationId":"getUsage","x-eov-operation-id":"show","x-eov-operation-handler":"organizationUsage","responses":{"200":{"description":"Organization and children data usage information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"404":{"$ref":"#/components/responses/Error"}}}},"/projects":{"get":{"tags":["projects"],"summary":"Fetches projects according to the parameters given.","description":"Fetches projects according to the parameters given.\n\nSupported sort fields:\n* name (default)\n* createdAt\n* updatedAt\n","operationId":"getProjects","x-eov-operation-id":"index","x-eov-operation-handler":"projects","parameters":[{"$ref":"#/components/parameters/depth"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/searchText"},{"$ref":"#/components/parameters/sortBy"},{"in":"query","name":"filter","description":"Filters the results according to entries that match the supplied filter.\n","style":"deepObject","explode":true,"schema":{"type":"object","properties":{"type":{"type":"string"}}},"example":{"type":"esp32"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Projects"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}},"post":{"tags":["projects"],"summary":"Create a new project","description":"Create a new project, responds with the newly created project","operationId":"postProjects","x-eov-operation-id":"create","x-eov-operation-handler":"projects","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"responses":{"201":{"description":"Project created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/projects/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["projects"],"summary":"Fetch a project by it's ID or UUID.","description":"Returns the project with the specified Project ID or Project UUID.","operationId":"getProject","x-eov-operation-id":"show","x-eov-operation-handler":"projects","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"tags":["projects"],"summary":"Update an existing project","description":"Updates the project with the specified ID and returns the updated version.","operationId":"updateProject","x-eov-operation-id":"update","x-eov-operation-handler":"projects","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["projects"],"summary":"Delete a project","description":"Deletes the project with the specified ID.","operationId":"deleteProject","x-eov-operation-id":"destroy","x-eov-operation-handler":"projects","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/spec":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["projects"],"summary":"Fetch the specification for a project by either Project ID or Project UUID.","description":"Returns the project specification (design) having the specified ID. A Project UUID may also be specified in place of the Project ID.","operationId":"getProjectSpec","x-eov-operation-id":"show","x-eov-operation-handler":"projectSpec","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSpec"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["projects"],"summary":"Set the specification for a project","description":"Overwrites the current project specification (design) with the specified ID and\nreturns the updated version.\n","operationId":"createProjectSpec","x-eov-operation-id":"create","x-eov-operation-handler":"projectSpec","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSpec"}}}},"responses":{"201":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSpec"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/image":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["projects"],"summary":"Fetch a project's image","description":"Returns the project image","operationId":"getProjectImage","x-eov-operation-id":"show","x-eov-operation-handler":"projectImage","responses":{"200":{"description":"successful operation","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Image"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["projects"],"summary":"Update a project's image","description":"Updates the image for the specified ID.","operationId":"updateProjectImage","x-eov-operation-id":"create","x-eov-operation-handler":"projectImage","requestBody":{"required":true,"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Image"}}}},"responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["users"],"summary":"Delete a project's image","description":"Deletes the image set set for the specified ID.","operationId":"deleteProjectImage","x-eov-operation-id":"destroy","x-eov-operation-handler":"projectImage","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/users":{"get":{"tags":["users"],"summary":"Fetch all users","description":"Fetches users according to the parameters given.\n\nSupported sort fields:\n* username (default)\n* email\n* role\n* firstName\n* lastName\n* company\n* createdAt\n* updatedAt\n* lastActive\n","operationId":"getUsers","x-eov-operation-id":"index","x-eov-operation-handler":"users","parameters":[{"$ref":"#/components/parameters/depth"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/searchText"},{"$ref":"#/components/parameters/sortBy"}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}},"post":{"tags":["users"],"summary":"Create a new user","description":"Creates a new user.","operationId":"createUser","x-eov-operation-id":"create","x-eov-operation-handler":"users","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewUser"}}}},"responses":{"201":{"description":"User created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/users/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["users"],"summary":"Fetch a user","description":"Returns the user with the specified ID.","operationId":"getUser","x-eov-operation-id":"show","x-eov-operation-handler":"users","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"put":{"tags":["users"],"summary":"Update a user","description":"Updates the user with the specified ID and returns the updated version.","operationId":"updateUser","x-eov-operation-id":"update","x-eov-operation-handler":"users","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["users"],"summary":"Delete a user","description":"Deletes the user with the specified ID.","operationId":"deleteUser","x-eov-operation-id":"destroy","x-eov-operation-handler":"users","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}},"/users/{id}/image":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"tags":["users"],"summary":"Fetch a user's image","description":"Returns the user image","operationId":"getUserImage","x-eov-operation-id":"show","x-eov-operation-handler":"userImage","responses":{"200":{"description":"successful operation","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Image"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["users"],"summary":"Update a users image","description":"Updates the image for the specified ID.","operationId":"updateUserImage","x-eov-operation-id":"create","x-eov-operation-handler":"userImage","requestBody":{"required":true,"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Image"}}}},"responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["users"],"summary":"Delete a user's set image","description":"Deletes the image set set for the specified ID.","operationId":"deleteUserImage","x-eov-operation-id":"destroy","x-eov-operation-handler":"userImage","responses":{"204":{"description":"successful operation"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"jwt":{"description":"This is the preferred authentication scheme, offering the most robust security. A call to\n`/auth/login` returns a JSON Web Token (https://jwt.io/), which is then used in\nsubsequent requests.\n\nThe JWT issued will expire in 15 minutes, after which time\nthe client should request a new token via `/auth/refreshToken` (preferred) or via `/auth/login`.\n","type":"http","scheme":"bearer","bearerFormat":"JWT"},"refreshToken":{"description":"Only supported for use with the `/auth/refreshToken` API method, this is the\npreferred mechanism for refreshing a JWT that has expired. Clients that support\ncookies will also receive a cookie containing a refreshToken during a\ncall to `/auth/login`. This cookie is to be used for fetching a new JWT when the\ncurrent one expires. This refresh token expires in 14 days, after which the user\nmust login again. Use of this process ensures that sensitive passwords or API\nkeys are transmitted as infrequently as possible.\n","type":"apiKey","in":"cookie","name":"refreshToken"},"apiKey":{"description":"Users may create an API Key for themselves in their user profile settings.\nThese API keys are functionally equivalent to a password, and should be treated\nas such. Setting this header on each API call is the most convenient mechanism for\nauthenticating with the API. However, this results in transmitting your sensitive key with\neach request. The recommended approach for API integration is to only use your\nAPI key to call `/auth/login` to fetch a JWT, and then use the JWT for subsequent\nrequests, until it expires. If your client supports cookies, we also recommend\nusing the refreshToken to fetch a new JWT, so that your API Key is only rarely\ntransmitted.\n","type":"apiKey","in":"header","name":"api_auth_token"},"apiKeyAlt":{"description":"Identical to `apiKey`, except that the key is set in the `authorization`\nheader.\n","type":"apiKey","in":"header","name":"authorization"},"deviceToken":{"description":"When a [device is created](#operation/postDevices), a security token is generated\nfor that device. This is intended to be used by the device for authentication,\nand should be kept secret.\nThis authentication scheme is limited to specific APIs, such as\n[Events](#tag/events). Look for where `deviceToken` is listed under\nthe API's \"AUTHORIZATIONS\" section.\n","type":"apiKey","in":"header","name":"cloud"}},"schemas":{"CloudEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","required":["sentAt"],"properties":{"sentAt":{"type":"string","readOnly":true,"format":"date-time"}}}]},"Device":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","minLength":1,"maxLength":80},"createdBy":{"type":"string","nullable":true,"readOnly":true},"uuid":{"type":"string","readOnly":true,"deprecated":true},"projectUuid":{"type":"string","minLength":24,"maxLength":36},"versionUuid":{"type":"string","nullable":true,"maxLength":36},"protocol":{"type":"string","nullable":true,"maxLength":20,"example":"ble"},"protocols":{"type":"array","minItems":0,"items":{"type":"string","nullable":true,"minLength":1,"maxLength":20}},"lastValues":{"type":"array","items":{"type":"object"},"readOnly":true},"lastActive":{"type":"string","format":"date-time","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"meta":{"type":"object","default":{},"deprecated":true},"statusText":{"type":"string","description":"Text device status. Maps 1-1 to statusInt in ascending order.","enum":["none","good","info","minor","warning","critical","missing"],"readOnly":true},"statusInt":{"type":"integer","description":"Integer device status. Maps 1-1 to statusText in ascending order.","minimum":0,"maximum":6,"readOnly":true},"description":{"type":"string","minLength":0,"maxLength":200,"example":"This is a device"},"streetAddress":{"type":"object","properties":{"address":{"type":"string","minLength":0,"maxLength":80,"example":"400 Park Avenue"},"city":{"type":"string","minLength":0,"maxLength":80,"example":"New York"},"region":{"type":"string","minLength":0,"maxLength":80,"example":"NY"},"postalCode":{"type":"string","minLength":0,"maxLength":20,"example":12000},"country":{"type":"string","minLength":0,"maxLength":80,"example":"United States"}}},"imageUrl":{"type":"string","example":"/v2/devices/{id}/image.png","readOnly":true,"nullable":true},"organizationName":{"type":"string","readOnly":true},"organizationId":{"type":"string","minLength":24,"maxLength":36}},"required":["name","projectUuid"]},"Devices":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginatedList"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Device"}}}},"Dashboard":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"options":{"type":"object"},"configuration":{"type":"object"}},"required":["configuration"]},"DeviceEvent":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","required":["receivedAt"],"properties":{"receivedAt":{"type":"string","readOnly":true,"format":"date-time"}}}]},"DeviceTableConfig":{"type":"object","properties":{"organizationId":{"type":"string","minLength":24,"maxLength":36},"deviceId":{"type":"string"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/DeviceTableColumn"}}},"required":["organizationId","columns"]},"DeviceTableColumn":{"type":"object","properties":{"path":{"type":"string"},"type":{"type":"string","enum":["DeviceModel","DeviceMeta","LastValues"]}},"required":["path","type"]},"DeviceSetting":{"type":"object","properties":{"id":{"type":"string","readOnly":true,"description":"Individual identifier for the device setting."},"deviceId":{"type":"string","readOnly":true,"description":"The device ID that the device setting is associated with."},"createdAt":{"type":"string","format":"date-time","readOnly":true,"description":"States when the setting was first created for the device."},"updatedAt":{"type":"string","format":"date-time","readOnly":true,"description":"States when the setting was last updated"},"changedAt":{"type":"string","format":"date-time","readOnly":true,"description":"The time the device setting was appended to its history of changes"},"changedToId":{"type":"string","readOnly":true,"description":"Refers to the next device setting in its history of changes."},"changedById":{"type":"string","readOnly":true,"description":"The user ID that changed the setting's value. The value will be null if changed by the system."},"name":{"type":"string","minLength":1,"maxLength":128,"description":"Non-human friendly name of the setting, a unique identifier that is tied to the device's project."},"title":{"anyOf":[{"type":"string"},{"type":"object"}],"type":"string","maxLength":200,"description":"Human-friendly name of the setting. If an object, the API expects a key-value map of the localizations. If a string, will internationalize to en-US","example":{"en-US":"Max threshold","es":"Umbral máximo"}},"description":{"type":"string","maxLength":2000,"description":"Human-friendly description of what the setting is used for. Accepts an internationalization mapping or a string. If a string, en-US is defaulted as the locale.","example":"{\n    'en-US': 'Defines the upper limit of the value before alarms are triggered',\n    'es': 'Define el límite superior del valor antes de que se activen las alarmas',\n}\n"},"inputType":{"type":"string","enum":["text","number","toggle","geolocation"],"description":"States what type of input will be presented to the user in the UI in order to update the setting."},"inputTypeProperties":{"type":"object","description":"Defines additional properties for this setting's input. Such as min and max numbers, or available options in the dropdowns."},"value":{"description":"The value of the configured device setting. Can be any of the listed types, but will resolve to an key-value pair where the key is the \"name\" of the input when stored.","example":{"textInput1":"This is an example value"}},"defaultValue":{"description":"The default value of the defined device setting. Similar to the 'value' property.","example":{"textInput1":"This is an example value"}},"listOrder":{"type":"number","description":"Defines the placement of the setting input on the form presented to the user in the UI."}}},"DeviceSettings":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginatedList"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DeviceSetting"}}}},"DeviceLocation":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"uuid":{"type":"string","readOnly":true},"organizationId":{"type":"string","minLength":24,"maxLength":36,"readOnly":true},"name":{"type":"string","minLength":1,"maxLength":80,"readOnly":true},"latitude":{"type":"number","readOnly":true},"longitude":{"type":"number","readOnly":true},"statusInt":{"type":"integer","description":"Integer device status. Maps 1-1 to statusText in ascending order.","minimum":0,"maximum":6,"readOnly":true},"statusText":{"type":"string","description":"Text device status. Maps 1-1 to statusInt in ascending order.","enum":["none","good","info","minor","warning","critical","missing"],"readOnly":true}}},"DeviceLocations":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginatedList"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DeviceLocation"}}}},"Error":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string"},"errors":{"type":"array","items":{"properties":{"field":{"type":"string"},"message":{"type":"string"}}}}},"required":["message"]},"Event":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"type":{"type":"string","readOnly":true},"deviceId":{"type":"string","readOnly":true},"elementName":{"type":"string","readOnly":true},"payload":{"anyOf":[{"type":"object"},{"type":"string"},{"type":"number"},{"type":"integer"},{"type":"boolean"},{"type":"array"}],"readOnly":true}}},"Events":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginatedList"},"data":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DeviceEvent"},{"$ref":"#/components/schemas/CloudEvent"}]}}}},"Image":{"type":"string","pattern":"^data:image\\/(png|jpg|jpeg|gif|svg|webp);base64,.*$"},"JWT":{"type":"object","additionalProperties":false,"properties":{"jwtToken":{"type":"string"},"jwtTokenExpiry":{"type":"string"}},"required":["jwtToken","jwtTokenExpiry"]},"LastValue":{"type":"object","additionalProperties":false,"properties":{"updatedAt":{"type":"string","readOnly":true,"format":"date-time","description":"Timestamp when the last data was received. Only provided when there is latest data available for the provided elementName."},"deviceId":{"type":"string","readOnly":true,"description":"The ID of the device which collected these values.","example":"5f88b9fb2856480025cb48bd"},"elementName":{"type":"string","readOnly":true,"description":"The name of the Storage Element that collected these values.","example":"CloudStorage1"},"values":{"anyOf":[{"type":"object","additionalProperties":true,"nullable":true},{"type":"string","nullable":true},{"type":"number","nullable":true},{"type":"boolean","nullable":true},{"type":"array","nullable":true}],"readOnly":true,"description":"If an object-literal (i.e. `{ \"foo\" : \"bar\" }` is stored in this Storage\nElement, this contains the collection of keys that have been stored,\nwith the most recent value assigned to each. If something other than an\nobject-literal has been stored, this contains the most recent value.\n","example":{"temp":"55"}}},"required":["updatedAt","deviceId","elementName","values"]},"Login":{"type":"object","additionalProperties":false,"properties":{"usernameOrEmail":{"type":"string","description":"Can either be a username or e-mail address belonging to an account on the platform."},"password":{"type":"string","format":"password"}},"required":["usernameOrEmail","password"]},"NewUser":{"type":"object","properties":{"username":{"type":"string","description":"Username for the user. Must be globally unique. May be same as email."},"password":{"type":"string","writeOnly":true,"description":"User's plaintext password. Only used for user creation."},"passwordConfirmation":{"type":"string","writeOnly":true,"description":"User's plaintext password. Only used for user creation. Must match password field."},"firstName":{"type":"string","description":"User's given name."},"lastName":{"type":"string","description":"User's surname."},"email":{"type":"string","format":"email","description":"Email address for the user. Must be globally unique."},"company":{"type":"string","description":"Company name for the user."},"role":{"type":"string","description":"The user's role.","example":"developer"},"organizationId":{"type":"string"},"tosHash":{"type":"string"},"language":{"type":"string"}},"required":["email","username","role","firstName","lastName","company"]},"Notification":{"type":"object","description":"Each notification object contains a key for each available language. Each language entry is an object with key \"message\" and value is the string message contents.'\n","properties":{"id":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"translations":{"type":"object","readOnly":true},"type":{"type":"string","readOnly":true},"read":{"type":"boolean"}},"example":{"createdAt":"2020-10-16T14:33:10.345Z","id":"34958232845","type":"deviceNotification","read":false,"translations":{"en-US":{"message":"Here is my message text"},"fr-FR":{"message":"voici mon texte de message"}}}},"Notifications":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginatedList"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}},"Organization":{"type":"object","description":"Organization is a core construct for applications in Atmosphere, though they are effectively hidden for IoT Studio users (i.e. users with a role of `developer`).","additionalProperties":true,"properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","minLength":1,"maxLength":80},"parentId":{"type":"string","minLength":0,"maxLength":36,"nullable":true},"description":{"type":"string","minLength":0,"maxLength":200},"path":{"description":"Path from organization to the highest level organization the user has access to","type":"array","readOnly":true,"items":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}}}},"imageUrl":{"type":"string","readOnly":true,"example":"/v2/organizations/{id}/image.png","nullable":true},"parentName":{"type":"string","readOnly":true},"createdAt":{"type":"string","readOnly":true},"updatedAt":{"type":"string","readOnly":true},"hasChildren":{"type":"boolean","readOnly":true},"statusText":{"type":"string","description":"Text device status. Maps 1-1 to statusInt in ascending order.","enum":["none","good","info","minor","warning","critical","missing"],"readOnly":true},"statusInt":{"type":"integer","description":"Integer device status. Maps 1-1 to statusText in ascending order.","minimum":0,"maximum":6,"readOnly":true},"deviceCount":{"type":"integer","description":"Lists how many devices are registered within this organization. Only available through the /usage API","readOnly":true},"dataUsageMb":{"type":"number","description":"Lists how much device data in bytes is stored by the devices belonging to the organization. Only available through the /usage API.","readOnly":true},"deviceCountLimit":{"type":"integer","readOnly":true},"dataUsageMbLimit":{"type":"integer","readOnly":true},"childrenInheritDashboard":{"type":"boolean","default":false},"deviceTable":{"description":"Contains configuration related to the device table columns\n","type":"object"}},"required":["name"]},"Organizations":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginatedList"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}},"OrganizationBranding":{"type":"object","description":"Organization branding","additionalProperties":false,"properties":{"organizationId":{"type":"string","minLength":24,"maxLength":36,"description":"The Organization to which this branding belongs."},"companyName":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"domain":{"type":"string","description":"The FQDN associated with the organization and it's branding data."},"domainHTTPFileOverrides":{"type":"object"},"domainPublicConfiguration":{"type":"object"},"email":{"type":"string","format":"email"},"emailSenderName":{"type":"string","description":"The name associated with the email such as Foo Bar <foo.bar@example.com>"}}},"Project":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string","minLength":1,"maxLength":80},"type":{"description":"A simple, short, string description that allows the user to categorize the project.\nThis field is copied from the project type specified in the ProjectSpec.\n","type":"string","minLength":0,"maxLength":80,"readOnly":true},"uuid":{"type":"string","readOnly":true,"deprecated":true},"organizationId":{"type":"string","minLength":24,"maxLength":36},"organizationName":{"type":"string","readOnly":true},"imageUrl":{"description":"URL to the default device image, specified in the ProjectSpec.\n","type":"string","example":"https://foo.bar/path/to/image.png","readOnly":true,"nullable":true},"createdBy":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}},"required":["name"]},"Projects":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginatedList"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}},"ProjectSpec":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"createVersion":{"type":"string","minLength":1,"maxLength":16,"default":"2"},"description":{"type":"string","minLength":0,"maxLength":2000,"default":""},"created":{"type":"string","format":"date-time"},"lastModified":{"type":"string","format":"date-time"},"meta":{"type":"object","default":{}},"planes":{"type":"object","default":{}}},"required":["name"]},"PaginatedList":{"type":"object","additionalProperties":false,"properties":{"totalDocs":{"description":"Total number of documents in the query","type":"integer","readOnly":true},"page":{"type":"integer","readOnly":true},"limit":{"type":"integer","readOnly":true},"hasPrevPage":{"type":"boolean","readOnly":true},"hasNextPage":{"type":"boolean","readOnly":true},"totalPages":{"description":"Total number of pages in the query","type":"integer","readOnly":true}}},"StoredValue":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","readOnly":true,"example":"5f749d9cfa570d0025b6f20b","description":"Unique identifier for this Stored Value."},"createdAt":{"type":"string","readOnly":true,"format":"date-time","description":"Timestamp when this record was created."},"deviceId":{"type":"string","readOnly":true,"description":"The ID of the device which owns this Storage Element.","example":"5f88b9fb2856480025cb48bd"},"elementName":{"type":"string","readOnly":true,"description":"The name of the Storage Element that collected these values.","example":"CloudStorage1"},"payload":{"anyOf":[{"type":"object"},{"type":"string"},{"type":"number"},{"type":"integer"},{"type":"boolean"},{"type":"array"}],"readOnly":true,"description":"The value stored in the Storage Element. This is determined by the Project\ndesign, at the time the data was stored.\n","example":{"temp":"55"}}}},"StoredValues":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginatedList"},"data":{"type":"array","items":{"$ref":"#/components/schemas/StoredValue"}}}},"StorageElement":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"readOnly":true,"description":"The name of the Storage Element, which was set in the project.\n"},"deviceId":{"type":"string","minLength":24,"maxLength":36,"readOnly":true,"description":"The ID of the device to which this Storage Element is attached.\n"},"createdAt":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the Storage Element was created (i.e. the oldest value).\n"},"updatedAt":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the Storage Element was last updated (i.e. the most recent value).\n"}}},"StorageElements":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginatedList"},"bytesStored":{"type":"integer","readOnly":true,"description":"How many bytes of storage are consumed by the device.","example":1024},"storageElements":{"type":"array","readOnly":true,"description":"List of Storage Elements the device has.","items":{"$ref":"#/components/schemas/StorageElement"}}}},"User":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","readOnly":true},"username":{"type":"string","minLength":1,"maxLength":254,"description":"Username must be globally unique. Once the user is created, this field is read-only."},"email":{"type":"string","minLength":3,"maxLength":254,"format":"email","description":"Email must be globally unique. Once the user is created, this field is read-only."},"role":{"type":"string","enum":["basicUser","technician","manager","administrator","developer","systemAdmin"],"description":"The user's role. When setting/changing a user's role, the user making the change may only set a role to which they have access.","example":"technican"},"password":{"type":"string","minLength":6,"maxLength":20,"writeOnly":true,"description":"User's plaintext password. Only used when setting a new password."},"passwordConfirmation":{"type":"string","minLength":6,"maxLength":20,"writeOnly":true,"description":"User's plaintext password. Only used when setting a new password. Must match password field for successful save."},"tosHash":{"type":"string","description":"Hash used as a signature that the user has signed the Terms of Service. Only used when agreeing to terms of service."},"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"company":{"type":"string","minLength":1,"maxLength":80},"jobTitle":{"type":"string","minLength":0,"maxLength":80},"language":{"type":"string","minLength":0,"maxLength":80},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"lastActive":{"type":"string","format":"date-time","readOnly":true},"preferences":{"type":"object","properties":{"notifications":{"type":"object","properties":{"accountNotifications":{"type":"object","properties":{"inapp":{"type":"boolean","default":true},"email":{"type":"boolean","default":false}},"description":"Account notifications are specific to the user's account. This may include notifications pertaining to device or data limits, or other account-related activity."},"systemNotification":{"type":"object","properties":{"inapp":{"type":"boolean","default":true},"email":{"type":"boolean","default":false}},"description":"System Notifications are sent to all users of the platform, to notify of system updates, maintenance, and other relevant news."},"deviceNotification":{"type":"object","properties":{"inapp":{"type":"boolean","default":true},"email":{"type":"boolean","default":false}},"description":"Device Notifications are emitted by the Cloud Notification element, as part of the user's application."}}}},"description":"The user's preferences."},"imageUrl":{"type":"string","readOnly":true,"description":"URL to the location of the User's profile image.","example":"/users/{id}/image.png","nullable":true},"organizationName":{"type":"string"},"organizationId":{"type":"string","description":"The Organization to which this user belongs. If not set on a new user, it will be set to the same Organization as the user making the request."},"reason":{"type":"string","minLength":1,"maxLength":300,"writeOnly":true,"description":"Internal use only."},"disabled":{"type":"boolean","default":true,"description":"Determines if the user is disabled or not"}},"required":["email","username","role","firstName","lastName","company"]},"Users":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/PaginatedList"},"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}},"parameters":{"id":{"in":"path","name":"id","description":"Resource ID","required":true,"schema":{"type":"string"}},"depth":{"in":"query","name":"depth","description":"Maximum depth of the tree to return results. Default is 1. \"all\" will return all results.\n","schema":{"oneOf":[{"type":"string","enum":["all"]},{"type":"integer","minimum":1}],"default":1}},"elementName":{"in":"path","name":"elementName","description":"The name of an element","required":true,"schema":{"type":"string"}},"page":{"in":"query","name":"page","description":"desired page for pagination","schema":{"type":"integer","format":"int32","example":5,"default":1,"minimum":1}},"limit":{"in":"query","name":"limit","description":"max records to return for pagination","schema":{"type":"integer","format":"int32","example":10,"default":100,"minimum":1,"maximum":10000}},"organizationId":{"in":"query","name":"organizationId","description":"organization ID query","schema":{"type":"string"}},"parentOrganizationId":{"in":"query","name":"parentId","description":"parent organization id","schema":{"type":"string"}},"searchText":{"in":"query","name":"searchText","description":"Filters the results according to entries that match the supplied text. The specific fields searched vary according to the entity.","schema":{"type":"string","example":"SearchString"}},"sortBy":{"in":"query","name":"sortBy","description":"Sort the results according to this value. Allowed sort fields varies according to the entity.\nOptionally, the sort order may be specified by prepending a `+` for ascending and `-` for\ndescending. This parameter may be specified multiple times, which will be processed in\nsubsequent order (i.e. first supplied parameter will be primary sort, second supplied\nparameter will be secondary sort, etc).\n","example":["field1","-field2"],"style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},"from":{"name":"from","in":"query","description":"Start date of resources. Inclusive.","example":"2020-05-11T15:51:06Z","required":false,"schema":{"type":"string","format":"date-time"}},"to":{"name":"to","in":"query","description":"End date of resources. Not inclusive.","example":"2020-05-12T15:51:06Z","required":false,"schema":{"type":"string","format":"date-time"}},"toRequired":{"name":"to","in":"query","description":"End date of resources","required":true,"schema":{"type":"string","format":"date-time"}},"lastValues":{"in":"query","name":"lastValues","description":"Include latest device data values in query. Similar to /devices/{id}/last\nProviding 'all' will return the lastest data values from all the storage elements\nof the device(s). Supports comma separated values to define which datasets \nare returned, must be URI encoded.\n","example":"all || TemperatureStorage%2CHumidityStorage","schema":{"type":"string"}},"entityList":{"in":"query","name":"entityList","description":"Query only a list of the entity ID's provided. For example, a subset of devices, users, organizations\nso on and so forth may be returned and filtered from the query back to the client using this parameter.\n","example":["60b8ea2f8535950026b6ed99","60b8ea2f8535950026b6ed97","60b8ea1670cd970025eeeceb","60b8e9e28535950026b6ed4f","60b8e9e28535950026b6ed49","60b8e9e28535950026b6ed51","60b8e90a8cfe3200253b017b","60b8ea1670cd970025eeece9","60b8ea1670cd970025eeeced","60b8e90a8cfe3200253b0173","60d0e2778770a10025ead3f7"],"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"}}}},"requestBodies":{"MultipleDeviceSettings":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"deviceId":{"type":"string","description":"The device ID that the device setting is associated with.","example":"6108da42fdb2591be2304264"},"name":{"type":"string","minLength":1,"maxLength":128,"description":"Non-human friendly name of the setting, a unique identifier that is tied to the device's project."},"value":{"description":"The value of the configured device setting. Can be any of the listed types, but will resolve to an key-value pair where the key is the \"name\" of the input when stored.","example":{"textInput1":"This is an example value"}}}}]},"example":[{"deviceId":"6108da42fdb2591be2304275","name":"CloudDeviceSetting1","value":"Text value here"},{"deviceId":"6108da42fdb2591be2304264","name":"CloudDeviceSetting2","value":33},{"deviceId":"6108da42fdb2591be2304253","name":"CloudDeviceSetting3","value":false}]}}}},"deviceIdList":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"type":"string","example":"6108da42fdb2591be2304275"}]},"example":["6108da42fdb2591be2304275","6108da42fdb2591be2304264","6108da42fdb2591be2304253"]}}}}},"responses":{"Error":{"description":"Requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"notFound":{"value":{"message":"Requested Resource Not Found"}}}}}},"UnauthorizedError":{"description":"Credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"security":[{"jwt":[]},{"apiKey":[]},{"apiKeyAlt":[]}]}