openapi: 3.0.0 info: title: Adafruit IO REST API description: >+ ### The Internet of Things for Everyone The Adafruit IO HTTP API provides access to your Adafruit IO data from any programming language or hardware environment that can speak HTTP. The easiest way to get started is with [an Adafruit IO learn guide](https://learn.adafruit.com/series/adafruit-io-basics) and [a simple Internet of Things capable device like the Feather Huzzah](https://www.adafruit.com/product/2821). This API documentation is hosted on GitHub Pages and is available at [https://github.com/adafruit/io-api](https://github.com/adafruit/io-api). For questions or comments visit the [Adafruit IO Forums](https://forums.adafruit.com/viewforum.php?f=56) or the [adafruit-io channel on the Adafruit Discord server](https://discord.gg/adafruit). #### Authentication Authentication for every API request happens through the `X-AIO-Key` header or query parameter and your IO API key. A simple cURL request to get all available feeds for a user with the username "io_username" and the key "io_key_12345" could look like this: $ curl -H "X-AIO-Key: io_key_12345" https://io.adafruit.com/api/v2/io_username/feeds Or like this: $ curl "https://io.adafruit.com/api/v2/io_username/feeds?X-AIO-Key=io_key_12345 Using the node.js [request](https://github.com/request/request) library, IO HTTP requests are as easy as: ```js var request = require('request'); var options = { url: 'https://io.adafruit.com/api/v2/io_username/feeds', headers: { 'X-AIO-Key': 'io_key_12345', 'Content-Type': 'application/json' } }; function callback(error, response, body) { if (!error && response.statusCode == 200) { var feeds = JSON.parse(body); console.log(feeds.length + " FEEDS AVAILABLE"); feeds.forEach(function (feed) { console.log(feed.name, feed.key); }) } } request(options, callback); ``` Using the ESP8266 Arduino HTTPClient library, an HTTPS GET request would look like this (replacing `---` with your own values in the appropriate locations): ```arduino /// based on /// https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/examples/Authorization/Authorization.ino #include #include #include #include ESP8266WiFiMulti WiFiMulti; const char* ssid = "---"; const char* password = "---"; const char* host = "io.adafruit.com"; const char* io_key = "---"; const char* path_with_username = "/api/v2/---/dashboards"; // Use web browser to view and copy // SHA1 fingerprint of the certificate const char* fingerprint = "77 00 54 2D DA E7 D8 03 27 31 23 99 EB 27 DB CB A5 4C 57 18"; void setup() { Serial.begin(115200); for(uint8_t t = 4; t > 0; t--) { Serial.printf("[SETUP] WAIT %d...\n", t); Serial.flush(); delay(1000); } WiFi.mode(WIFI_STA); WiFiMulti.addAP(ssid, password); // wait for WiFi connection while(WiFiMulti.run() != WL_CONNECTED) { Serial.print('.'); delay(1000); } Serial.println("[WIFI] connected!"); HTTPClient http; // start request with URL and TLS cert fingerprint for verification http.begin("https://" + String(host) + String(path_with_username), fingerprint); // IO API authentication http.addHeader("X-AIO-Key", io_key); // start connection and send HTTP header int httpCode = http.GET(); // httpCode will be negative on error if(httpCode > 0) { // HTTP header has been send and Server response header has been handled Serial.printf("[HTTP] GET response: %d\n", httpCode); // HTTP 200 OK if(httpCode == HTTP_CODE_OK) { String payload = http.getString(); Serial.println(payload); } http.end(); } } void loop() {} ``` #### Client Libraries We have client libraries to help you get started with your project: [Python](https://github.com/adafruit/io-client-python), [Ruby](https://github.com/adafruit/io-client-ruby), [Arduino C++](https://github.com/adafruit/Adafruit_IO_Arduino), [Javascript](https://github.com/adafruit/adafruit-io-node), and [Go](https://github.com/adafruit/io-client-go) are available. They're all open source, so if they don't already do what you want, you can fork and add any feature you'd like. version: 2.0.0 x-logo: url: https://io.adafruit.com/api/docs/adafruit-flower-left.png security: - HeaderKey: [] - HeaderSignature: [] - QueryKey: [] paths: /user: get: x-swagger-router-controller: Users x-swagger-router-action: get operationId: currentUser summary: Get information about the current user tags: - Users responses: "200": description: A User record content: application/json: schema: $ref: "#/components/schemas/User" text/csv: schema: $ref: "#/components/schemas/User" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/throttle": get: x-swagger-router-controller: Users x-swagger-router-action: throttle operationId: getCurrentUserThrottle summary: Get the user's data rate limit and current activity level. tags: - Users parameters: - $ref: "#/components/parameters/UsernamePath" responses: "200": description: Data rate limit and current actions. content: application/json: schema: type: object properties: data_rate_limit: type: integer description: Max possible actions inside the time window (usually 1 minute). active_data_rate: type: integer description: Actions taken inside the time window. text/csv: schema: type: object properties: data_rate_limit: type: integer description: Max possible actions inside the time window (usually 1 minute). active_data_rate: type: integer description: Actions taken inside the time window. "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/activities": get: x-swagger-router-controller: Activities x-swagger-router-action: all operationId: allActivities summary: All activities for current user description: The Activities endpoint returns information about the user's activities. tags: - Activities parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/StartTime" - $ref: "#/components/parameters/EndTime" - $ref: "#/components/parameters/Limit" responses: "200": description: An array of activities headers: X-Pagination-Limit: description: The limit this request is using, either your given value or the default (1000). schema: type: integer X-Pagination-Count: description: The number of records returned. schema: type: integer X-Pagination-Start: description: The created_at value for the oldest record returned. schema: type: string X-Pagination-End: description: The created_at value for the newest record returned. schema: type: string content: application/json: schema: type: array items: $ref: "#/components/schemas/Activity" text/csv: schema: type: array items: $ref: "#/components/schemas/Activity" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error delete: x-swagger-router-controller: Activities x-swagger-router-action: destroy operationId: destroyActivities summary: All activities for current user description: Delete all your activities. tags: - Activities parameters: - $ref: "#/components/parameters/UsernamePath" responses: "200": description: Deleted activities successfully "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/activities/{type}": get: x-swagger-router-controller: Activities x-swagger-router-action: get operationId: getActivity summary: Get activities by type for current user description: The Activities endpoint returns information about the user's activities. tags: - Activities parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/ActivityTypePath" - $ref: "#/components/parameters/StartTime" - $ref: "#/components/parameters/EndTime" - $ref: "#/components/parameters/Limit" responses: "200": description: An array of activities content: application/json: schema: type: array items: $ref: "#/components/schemas/Activity" text/csv: schema: type: array items: $ref: "#/components/schemas/Activity" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds": get: x-swagger-router-controller: Feeds x-swagger-router-action: all operationId: allFeeds summary: All feeds for current user description: The Feeds endpoint returns information about the user's feeds. The response includes the latest value of each feed, and other metadata about each feed. tags: - Feeds parameters: - $ref: "#/components/parameters/UsernamePath" responses: "200": description: An array of feeds content: application/json: schema: type: array items: $ref: "#/components/schemas/Feed" text/csv: schema: type: array items: $ref: "#/components/schemas/Feed" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error post: summary: Create a new Feed description: "" x-swagger-router-controller: Feeds x-swagger-router-action: create operationId: createFeed parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/GroupParam" requestBody: $ref: "#/components/requestBodies/createFeedFeed" tags: - Feeds responses: "200": description: New feed content: application/json: schema: $ref: "#/components/schemas/Feed" text/csv: schema: $ref: "#/components/schemas/Feed" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds/{feed_key}": get: description: Returns feed based on the feed key summary: Get feed by feed key x-swagger-router-controller: Feeds x-swagger-router-action: get operationId: getFeed tags: - Feeds responses: "200": description: Feed response content: application/json: schema: $ref: "#/components/schemas/Feed" text/csv: schema: $ref: "#/components/schemas/Feed" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" put: summary: Replace an existing Feed x-swagger-router-controller: Feeds x-swagger-router-action: replace operationId: replaceFeed description: "" parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" requestBody: $ref: "#/components/requestBodies/createFeedFeed" tags: - Feeds responses: "200": description: Updated feed content: application/json: schema: $ref: "#/components/schemas/Feed" text/csv: schema: $ref: "#/components/schemas/Feed" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error patch: summary: Update properties of an existing Feed description: "" x-swagger-router-controller: Feeds x-swagger-router-action: update operationId: updateFeed parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" requestBody: $ref: "#/components/requestBodies/createFeedFeed" tags: - Feeds responses: "200": description: Updated feed content: application/json: schema: $ref: "#/components/schemas/Feed" text/csv: schema: $ref: "#/components/schemas/Feed" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error delete: summary: Delete an existing Feed description: "" x-swagger-router-controller: Feeds x-swagger-router-action: destroy operationId: destroyFeed parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" tags: - Feeds responses: "200": description: Deleted feed successfully "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds/{feed_key}/details": get: description: Returns more detailed feed record based on the feed key summary: Get detailed feed by feed key x-swagger-router-controller: Feeds x-swagger-router-action: details operationId: getFeedDetails tags: - Feeds responses: "200": description: Feed response content: application/json: schema: $ref: "#/components/schemas/Feed" text/csv: schema: $ref: "#/components/schemas/Feed" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" "/{username}/feeds/{feed_key}/data": get: x-swagger-router-controller: Data x-swagger-router-action: all operationId: allData summary: Get all data for the given feed description: "" tags: - Data parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" - $ref: "#/components/parameters/StartTime" - $ref: "#/components/parameters/EndTime" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/DataInclude" responses: "200": description: An array of data headers: X-Pagination-Limit: description: The limit this request is using, either your given value or the default (1000). schema: type: integer X-Pagination-Count: description: The number of records returned. schema: type: integer X-Pagination-Start: description: The created_at value for the oldest record returned. schema: type: string X-Pagination-End: description: The created_at value for the newest record returned. schema: type: string content: application/json: schema: type: array items: $ref: "#/components/schemas/DataResponse" text/csv: schema: type: array items: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error post: summary: Create new Data operationId: createData description: >- Create new data records on the given feed. **NOTE:** when feed history is on, data `value` size is limited to 1KB, when feed history is turned off data value size is limited to 100KB. x-swagger-router-controller: Data x-swagger-router-action: create x-code-samples: - lang: curl source: |- curl -F 'value=65.5' -H 'X-AIO-Key: io_key_12345' \ https://io.adafruit.com/api/v2/io_username/feeds/io-feed-key/data - lang: Ruby source: |- api = Adafruit::IO::Client.new( key: ENV['IO_KEY'], username: ENV['IO_USERNAME'] ) api.send_data('io-feed-key', 65.5) parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" requestBody: $ref: "#/components/requestBodies/createDataDatum" tags: - Data responses: "200": description: New data content: application/json: schema: $ref: "#/components/schemas/Data" text/csv: schema: $ref: "#/components/schemas/Data" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds/{feed_key}/data/chart": get: x-swagger-router-controller: Data x-swagger-router-action: chart operationId: chartData summary: Chart data for current feed description: >- The Chart API is what we use on io.adafruit.com to populate charts over varying timespans with a consistent number of data points. The maximum number of points returned is 480. This API works by aggregating slices of time into a single value by averaging. All time-based parameters are optional, if none are given it will default to 1 hour at the finest-grained resolution possible. tags: - Data parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" - $ref: "#/components/parameters/StartTime" - $ref: "#/components/parameters/EndTime" - name: resolution in: query description: "A resolution size in minutes. By giving a resolution value you will get back grouped data points aggregated over resolution-sized intervals. NOTE: time span is preferred over resolution, so if you request a span of time that includes more than max limit points you may get a larger resolution than you requested. Valid resolutions are 1, 5, 10, 30, 60, and 120." schema: type: integer format: int32 - name: hours in: query description: The number of hours the chart should cover. schema: type: integer format: int32 responses: "200": description: A JSON record containing chart data and the parameters used to generate it. content: application/json: schema: type: object properties: feed: type: object properties: id: type: integer key: type: string name: type: string parameters: type: object properties: {} columns: type: array description: The names of the columns returned as data. items: type: string data: type: array description: The actual chart data. items: type: array items: type: string text/csv: schema: type: object properties: feed: type: object properties: id: type: integer key: type: string name: type: string parameters: type: object properties: {} columns: type: array description: The names of the columns returned as data. items: type: string data: type: array description: The actual chart data. items: type: array items: type: string "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds/{feed_key}/data/batch": post: summary: Create multiple new Data records x-swagger-router-controller: Data x-swagger-router-action: batch operationId: batchCreateData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" requestBody: $ref: "#/components/requestBodies/batchCreateDataData" tags: - Data responses: "200": description: New data content: application/json: schema: type: array items: $ref: "#/components/schemas/DataResponse" text/csv: schema: type: array items: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds/{feed_key}/data/previous": get: summary: Previous Data in Queue description: "Get the previously processed data point in the feed. NOTE: this method doesn't move the processing queue pointer." x-swagger-router-controller: Data x-swagger-router-action: previous operationId: previousData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" - $ref: "#/components/parameters/DataInclude" tags: - Data responses: "200": description: Data response content: application/json: schema: $ref: "#/components/schemas/DataResponse" text/csv: schema: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds/{feed_key}/data/next": get: summary: Next Data in Queue description: Get the next newest data point in the feed. If queue processing hasn't been started, the first data point in the feed will be returned. x-swagger-router-controller: Data x-swagger-router-action: next operationId: nextData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" - $ref: "#/components/parameters/DataInclude" tags: - Data responses: "200": description: Data response content: application/json: schema: $ref: "#/components/schemas/DataResponse" text/csv: schema: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds/{feed_key}/data/last": get: summary: Last Data in Queue description: Get the most recent data point in the feed. This request sets the queue pointer to the end of the feed. x-swagger-router-controller: Data x-swagger-router-action: last operationId: lastData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" - $ref: "#/components/parameters/DataInclude" tags: - Data responses: "200": description: Data response content: application/json: schema: $ref: "#/components/schemas/DataResponse" text/csv: schema: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds/{feed_key}/data/first": get: summary: First Data in Queue description: Get the oldest data point in the feed. This request sets the queue pointer to the beginning of the feed. x-swagger-router-controller: Data x-swagger-router-action: last operationId: firstData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" - $ref: "#/components/parameters/DataInclude" tags: - Data responses: "200": description: Data response content: application/json: schema: $ref: "#/components/schemas/DataResponse" text/csv: schema: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds/{feed_key}/data/retain": get: summary: Last Data in MQTT CSV format description: "Get the most recent data point in the feed in an MQTT compatible CSV format: `value,lat,lon,ele`" x-swagger-router-controller: Data x-swagger-router-action: retain operationId: retainData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" tags: - Data responses: "200": description: CSV string in `value,lat,lon,ele` format. The lat, lon, and ele values are left blank if they are not set. content: text/csv: schema: type: string "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/feeds/{feed_key}/data/{id}": get: summary: Returns data based on feed key description: "" x-swagger-router-controller: Data x-swagger-router-action: get operationId: getData tags: - Data parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" - $ref: "#/components/parameters/IDPath" - $ref: "#/components/parameters/DataInclude" responses: "200": description: Data response content: application/json: schema: $ref: "#/components/schemas/DataResponse" text/csv: schema: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error put: summary: Replace existing Data x-swagger-router-controller: Data x-swagger-router-action: replace operationId: replaceData description: "" parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createDataDatum" tags: - Data responses: "200": description: Updated Data content: application/json: schema: $ref: "#/components/schemas/DataResponse" text/csv: schema: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error patch: summary: Update properties of existing Data description: "" x-swagger-router-controller: Data x-swagger-router-action: update operationId: updateData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createDataDatum" tags: - Data responses: "200": description: Updated Data content: application/json: schema: $ref: "#/components/schemas/DataResponse" text/csv: schema: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error delete: summary: Delete existing Data description: "" x-swagger-router-controller: Data x-swagger-router-action: destroy operationId: destroyData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedPath" - $ref: "#/components/parameters/IDPath" tags: - Data responses: "200": description: Deleted Group successfully content: application/json: schema: type: string text/csv: schema: type: string "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/groups": get: summary: All groups for current user description: > The Groups endpoint returns information about the user's groups. The response includes the latest value of each feed in the group, and other metadata about the group. x-swagger-router-controller: Groups x-swagger-router-action: all operationId: allGroups tags: - Groups parameters: - $ref: "#/components/parameters/UsernamePath" responses: "200": description: An array of groups content: application/json: schema: type: array items: $ref: "#/components/schemas/Group" text/csv: schema: type: array items: $ref: "#/components/schemas/Group" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error post: summary: Create a new Group description: "" x-swagger-router-controller: Groups x-swagger-router-action: create operationId: createGroup parameters: - $ref: "#/components/parameters/UsernamePath" requestBody: $ref: "#/components/requestBodies/createGroupGroup" tags: - Groups responses: "200": description: New Group content: application/json: schema: $ref: "#/components/schemas/Group" text/csv: schema: $ref: "#/components/schemas/Group" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/groups/{group_key}": get: summary: Returns Group based on ID x-swagger-router-controller: Groups x-swagger-router-action: get operationId: getGroup tags: - Groups parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/GroupPath" responses: "200": description: Group response content: application/json: schema: $ref: "#/components/schemas/Group" text/csv: schema: $ref: "#/components/schemas/Group" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error" put: summary: Replace an existing Group x-swagger-router-controller: Groups x-swagger-router-action: replace operationId: replaceGroup description: "" parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/GroupPath" requestBody: $ref: "#/components/requestBodies/createGroupGroup" tags: - Groups responses: "200": description: Updated group content: application/json: schema: $ref: "#/components/schemas/Group" text/csv: schema: $ref: "#/components/schemas/Group" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error patch: summary: Update properties of an existing Group description: "" x-swagger-router-controller: Groups x-swagger-router-action: update operationId: updateGroup parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/GroupPath" requestBody: $ref: "#/components/requestBodies/createGroupGroup" tags: - Groups responses: "200": description: Updated Group content: application/json: schema: $ref: "#/components/schemas/Group" text/csv: schema: $ref: "#/components/schemas/Group" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error delete: summary: Delete an existing Group description: "" x-swagger-router-controller: Groups x-swagger-router-action: destroy operationId: destroyGroup parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/GroupPath" tags: - Groups responses: "200": description: Deleted Group successfully content: application/json: schema: type: string text/csv: schema: type: string "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/groups/{group_key}/add": post: summary: Add an existing Feed to a Group description: "" x-swagger-router-controller: Groups x-swagger-router-action: add_feed operationId: addFeedToGroup tags: - Groups - Feeds parameters: - $ref: "#/components/parameters/GroupPath" - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedParam" responses: "200": description: Updated group content: application/json: schema: $ref: "#/components/schemas/Group" text/csv: schema: $ref: "#/components/schemas/Group" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/groups/{group_key}/remove": post: summary: Remove a Feed from a Group description: "" x-swagger-router-controller: Groups x-swagger-router-action: remove_feed operationId: removeFeedFromGroup tags: - Groups - Feeds parameters: - $ref: "#/components/parameters/GroupPath" - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/FeedParam" responses: "200": description: Updated group content: application/json: schema: $ref: "#/components/schemas/Group" text/csv: schema: $ref: "#/components/schemas/Group" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/groups/{group_key}/feeds": get: x-swagger-router-controller: GroupFeeds x-swagger-router-action: group_all operationId: allGroupFeeds summary: All feeds for current user in a given group description: The Group Feeds endpoint returns information about the user's feeds. The response includes the latest value of each feed, and other metadata about each feed, but only for feeds within the given group. tags: - Groups - Feeds parameters: - $ref: "#/components/parameters/GroupPath" - $ref: "#/components/parameters/UsernamePath" responses: "200": description: An array of feeds content: application/json: schema: type: array items: $ref: "#/components/schemas/Feed" text/csv: schema: type: array items: $ref: "#/components/schemas/Feed" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error post: summary: Create a new Feed in a Group description: "" x-swagger-router-controller: GroupFeeds x-swagger-router-action: group_create operationId: createGroupFeed parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/GroupPath" requestBody: $ref: "#/components/requestBodies/createFeedFeed" tags: - Feeds responses: "200": description: New feed content: application/json: schema: $ref: "#/components/schemas/Feed" text/csv: schema: $ref: "#/components/schemas/Feed" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/groups/{group_key}/data": post: summary: Create new data for multiple feeds in a group x-swagger-router-controller: Data x-swagger-router-action: group_create operationId: createGroupData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/GroupPath" requestBody: content: application/json: schema: type: object required: - feeds properties: location: type: object description: A location record with `lat`, `lon`, and [optional] `ele` properties. required: - lat - lon properties: lat: type: number lon: type: number ele: type: number feeds: description: An array of feed data records with `key` and `value` properties. type: array items: type: object required: - key - value properties: key: type: string value: type: string created_at: type: string description: Optional created_at timestamp which will be applied to all feed values created. application/x-www-form-urlencoded: schema: type: object required: - feeds properties: location: type: object description: A location record with `lat`, `lon`, and [optional] `ele` properties. required: - lat - lon properties: lat: type: number lon: type: number ele: type: number feeds: description: An array of feed data records with `key` and `value` properties. type: array items: type: object required: - key - value properties: key: type: string value: type: string created_at: type: string description: Optional created_at timestamp which will be applied to all feed values created. required: true tags: - Data responses: "200": description: New data content: application/json: schema: type: array items: $ref: "#/components/schemas/DataResponse" text/csv: schema: type: array items: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/groups/{group_key}/feeds/{feed_key}/data": get: x-swagger-router-controller: Data x-swagger-router-action: group_all operationId: allGroupFeedData summary: All data for current feed in a specific group description: "" tags: - Data parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/GroupPath" - $ref: "#/components/parameters/FeedPath" - name: start_time in: query description: Start time for filtering data. Returns data created after given time. schema: type: string format: date-time - name: end_time in: query description: End time for filtering data. Returns data created before give time. schema: type: string format: date-time - name: limit in: query description: Limit the number of records returned. schema: type: integer responses: "200": description: An array of data content: application/json: schema: type: array items: $ref: "#/components/schemas/DataResponse" text/csv: schema: type: array items: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error post: summary: Create new Data in a feed belonging to a particular group x-swagger-router-controller: Data x-swagger-router-action: group_feed_create operationId: createGroupFeedData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/GroupPath" - $ref: "#/components/parameters/FeedPath" requestBody: $ref: "#/components/requestBodies/createDataDatum" tags: - Data responses: "200": description: New data content: application/json: schema: $ref: "#/components/schemas/DataResponse" text/csv: schema: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/groups/{group_key}/feeds/{feed_key}/data/batch": post: summary: Create multiple new Data records in a feed belonging to a particular group x-swagger-router-controller: Data x-swagger-router-action: group_feed_batch operationId: batchCreateGroupFeedData parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/GroupPath" - $ref: "#/components/parameters/FeedPath" requestBody: $ref: "#/components/requestBodies/batchCreateDataData" tags: - Data responses: "200": description: New data content: application/json: schema: type: array items: $ref: "#/components/schemas/DataResponse" text/csv: schema: type: array items: $ref: "#/components/schemas/DataResponse" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/dashboards": get: summary: All dashboards for current user description: | The Dashboards endpoint returns information about the user's dashboards. x-swagger-router-controller: Dashboards x-swagger-router-action: all operationId: allDashboards tags: - Dashboards parameters: - $ref: "#/components/parameters/UsernamePath" responses: "200": description: An array of dashboards content: application/json: schema: type: array items: $ref: "#/components/schemas/Dashboard" text/csv: schema: type: array items: $ref: "#/components/schemas/Dashboard" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error post: summary: Create a new Dashboard description: "" x-swagger-router-controller: Dashboards x-swagger-router-action: create operationId: createDashboard parameters: - $ref: "#/components/parameters/UsernamePath" requestBody: $ref: "#/components/requestBodies/createDashboardDashboard" tags: - Dashboards responses: "200": description: New Dashboard content: application/json: schema: $ref: "#/components/schemas/Dashboard" text/csv: schema: $ref: "#/components/schemas/Dashboard" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/dashboards/{id}": get: summary: Returns Dashboard based on ID description: "" x-swagger-router-controller: Dashboards x-swagger-router-action: get operationId: getDashboard tags: - Dashboards parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" responses: "200": description: Dashboard response content: application/json: schema: $ref: "#/components/schemas/Dashboard" text/csv: schema: $ref: "#/components/schemas/Dashboard" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error" put: summary: Replace an existing Dashboard x-swagger-router-controller: Dashboards x-swagger-router-action: replace operationId: replaceDashboard description: "" parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createDashboardDashboard" tags: - Dashboards responses: "200": description: Updated dashboard content: application/json: schema: $ref: "#/components/schemas/Dashboard" text/csv: schema: $ref: "#/components/schemas/Dashboard" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error patch: summary: Update properties of an existing Dashboard description: "" x-swagger-router-controller: Dashboards x-swagger-router-action: update operationId: updateDashboard parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createDashboardDashboard" tags: - Dashboards responses: "200": description: Updated Dashboard content: application/json: schema: $ref: "#/components/schemas/Dashboard" text/csv: schema: $ref: "#/components/schemas/Dashboard" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error delete: summary: Delete an existing Dashboard description: "" x-swagger-router-controller: Dashboards x-swagger-router-action: destroy operationId: destroyDashboard parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" tags: - Dashboards responses: "200": description: Deleted Dashboard successfully content: application/json: schema: type: string text/csv: schema: type: string "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/dashboards/{dashboard_id}/blocks": get: summary: All blocks for current user description: | The Blocks endpoint returns information about the user's blocks. x-swagger-router-controller: Blocks x-swagger-router-action: all operationId: allBlocks tags: - Blocks parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/DashboardIDPath" responses: "200": description: An array of blocks content: application/json: schema: type: array items: $ref: "#/components/schemas/Block" text/csv: schema: type: array items: $ref: "#/components/schemas/Block" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error post: summary: Create a new Block description: "" x-swagger-router-controller: Blocks x-swagger-router-action: create operationId: createBlock parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/DashboardIDPath" requestBody: $ref: "#/components/requestBodies/createBlockBlock" tags: - Blocks responses: "200": description: New Block content: application/json: schema: $ref: "#/components/schemas/Block" text/csv: schema: $ref: "#/components/schemas/Block" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/dashboards/{dashboard_id}/blocks/{id}": get: summary: Returns Block based on ID description: "" x-swagger-router-controller: Blocks x-swagger-router-action: get operationId: getBlock tags: - Blocks parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/DashboardIDPath" - $ref: "#/components/parameters/IDPath" responses: "200": description: Block response content: application/json: schema: $ref: "#/components/schemas/Block" text/csv: schema: $ref: "#/components/schemas/Block" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error" put: summary: Replace an existing Block x-swagger-router-controller: Blocks x-swagger-router-action: replace operationId: replaceBlock description: "" parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/DashboardIDPath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createBlockBlock" tags: - Blocks responses: "200": description: Updated block content: application/json: schema: $ref: "#/components/schemas/Block" text/csv: schema: $ref: "#/components/schemas/Block" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error patch: summary: Update properties of an existing Block description: "" x-swagger-router-controller: Blocks x-swagger-router-action: update operationId: updateBlock parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/DashboardIDPath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createBlockBlock" tags: - Blocks responses: "200": description: Updated Block content: application/json: schema: $ref: "#/components/schemas/Block" text/csv: schema: $ref: "#/components/schemas/Block" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error delete: summary: Delete an existing Block description: "" x-swagger-router-controller: Blocks x-swagger-router-action: destroy operationId: destroyBlock parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/DashboardIDPath" - $ref: "#/components/parameters/IDPath" tags: - Blocks responses: "200": description: Deleted Block successfully content: application/json: schema: type: string text/csv: schema: type: string "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/tokens": get: summary: All tokens for current user description: | The Tokens endpoint returns information about the user's tokens. x-swagger-router-controller: Tokens x-swagger-router-action: all operationId: allTokens tags: - Tokens parameters: - $ref: "#/components/parameters/UsernamePath" responses: "200": description: An array of tokens content: application/json: schema: type: array items: $ref: "#/components/schemas/Token" text/csv: schema: type: array items: $ref: "#/components/schemas/Token" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error post: summary: Create a new Token description: "" x-swagger-router-controller: Tokens x-swagger-router-action: create operationId: createToken parameters: - $ref: "#/components/parameters/UsernamePath" requestBody: $ref: "#/components/requestBodies/createTokenToken" tags: - Tokens responses: "200": description: New Token content: application/json: schema: $ref: "#/components/schemas/Token" text/csv: schema: $ref: "#/components/schemas/Token" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/tokens/{id}": get: summary: Returns Token based on ID description: "" x-swagger-router-controller: Tokens x-swagger-router-action: get operationId: getToken tags: - Tokens parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" responses: "200": description: Token response content: application/json: schema: $ref: "#/components/schemas/Token" text/csv: schema: $ref: "#/components/schemas/Token" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error" put: summary: Replace an existing Token x-swagger-router-controller: Tokens x-swagger-router-action: replace operationId: replaceToken description: "" parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createTokenToken" tags: - Tokens responses: "200": description: Updated token content: application/json: schema: $ref: "#/components/schemas/Token" text/csv: schema: $ref: "#/components/schemas/Token" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error patch: summary: Update properties of an existing Token description: "" x-swagger-router-controller: Tokens x-swagger-router-action: update operationId: updateToken parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createTokenToken" tags: - Tokens responses: "200": description: Updated Token content: application/json: schema: $ref: "#/components/schemas/Token" text/csv: schema: $ref: "#/components/schemas/Token" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error delete: summary: Delete an existing Token description: "" x-swagger-router-controller: Tokens x-swagger-router-action: destroy operationId: destroyToken parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" tags: - Tokens responses: "200": description: Deleted Token successfully content: application/json: schema: type: string text/csv: schema: type: string "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/triggers": get: summary: All triggers for current user description: | The Triggers endpoint returns information about the user's triggers. x-swagger-router-controller: Triggers x-swagger-router-action: all operationId: allTriggers tags: - Triggers parameters: - $ref: "#/components/parameters/UsernamePath" responses: "200": description: An array of triggers content: application/json: schema: type: array items: $ref: "#/components/schemas/Trigger" text/csv: schema: type: array items: $ref: "#/components/schemas/Trigger" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error post: summary: Create a new Trigger description: "" x-swagger-router-controller: Triggers x-swagger-router-action: create operationId: createTrigger parameters: - $ref: "#/components/parameters/UsernamePath" requestBody: $ref: "#/components/requestBodies/createTriggerTrigger" tags: - Triggers responses: "200": description: New Trigger content: application/json: schema: $ref: "#/components/schemas/Trigger" text/csv: schema: $ref: "#/components/schemas/Trigger" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/triggers/{id}": get: summary: Returns Trigger based on ID description: "" x-swagger-router-controller: Triggers x-swagger-router-action: get operationId: getTrigger tags: - Triggers parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" responses: "200": description: Trigger response content: application/json: schema: $ref: "#/components/schemas/Trigger" text/csv: schema: $ref: "#/components/schemas/Trigger" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error" put: summary: Replace an existing Trigger x-swagger-router-controller: Triggers x-swagger-router-action: replace operationId: replaceTrigger description: "" parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createTriggerTrigger" tags: - Triggers responses: "200": description: Updated trigger content: application/json: schema: $ref: "#/components/schemas/Trigger" text/csv: schema: $ref: "#/components/schemas/Trigger" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error patch: summary: Update properties of an existing Trigger description: "" x-swagger-router-controller: Triggers x-swagger-router-action: update operationId: updateTrigger parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createTriggerTrigger" tags: - Triggers responses: "200": description: Updated Trigger content: application/json: schema: $ref: "#/components/schemas/Trigger" text/csv: schema: $ref: "#/components/schemas/Trigger" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error delete: summary: Delete an existing Trigger description: "" x-swagger-router-controller: Triggers x-swagger-router-action: destroy operationId: destroyTrigger parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/IDPath" tags: - Triggers responses: "200": description: Deleted Trigger successfully content: application/json: schema: type: string text/csv: schema: type: string "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/{type}/{type_id}/acl": get: summary: All permissions for current user and type description: > The Permissions endpoint returns information about the user's permissions. x-swagger-router-controller: Permissions x-swagger-router-action: all operationId: allPermissions tags: - Permissions parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/PermTypePath" - $ref: "#/components/parameters/PermTypeIDPath" responses: "200": description: An array of permissions content: application/json: schema: type: array items: $ref: "#/components/schemas/Permission" text/csv: schema: type: array items: $ref: "#/components/schemas/Permission" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error post: summary: Create a new Permission description: "" x-swagger-router-controller: Permissions x-swagger-router-action: create operationId: createPermission parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/PermTypePath" - $ref: "#/components/parameters/PermTypeIDPath" requestBody: $ref: "#/components/requestBodies/createPermissionPermission" tags: - Permissions responses: "200": description: New Permission content: application/json: schema: $ref: "#/components/schemas/Permission" text/csv: schema: $ref: "#/components/schemas/Permission" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error "/{username}/{type}/{type_id}/acl/{id}": get: summary: Returns Permission based on ID description: "" x-swagger-router-controller: Permissions x-swagger-router-action: get operationId: getPermission tags: - Permissions parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/PermTypePath" - $ref: "#/components/parameters/PermTypeIDPath" - $ref: "#/components/parameters/IDPath" responses: "200": description: Permission response content: application/json: schema: $ref: "#/components/schemas/Permission" text/csv: schema: $ref: "#/components/schemas/Permission" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error" put: summary: Replace an existing Permission x-swagger-router-controller: Permissions x-swagger-router-action: replace operationId: replacePermission description: "" parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/PermTypePath" - $ref: "#/components/parameters/PermTypeIDPath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createPermissionPermission" tags: - Permissions responses: "200": description: Updated permission content: application/json: schema: $ref: "#/components/schemas/Permission" text/csv: schema: $ref: "#/components/schemas/Permission" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error patch: summary: Update properties of an existing Permission description: "" x-swagger-router-controller: Permissions x-swagger-router-action: update operationId: updatePermission parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/PermTypePath" - $ref: "#/components/parameters/PermTypeIDPath" - $ref: "#/components/parameters/IDPath" requestBody: $ref: "#/components/requestBodies/createPermissionPermission" tags: - Permissions responses: "200": description: Updated Permission content: application/json: schema: $ref: "#/components/schemas/Permission" text/csv: schema: $ref: "#/components/schemas/Permission" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error delete: summary: Delete an existing Permission description: "" x-swagger-router-controller: Permissions x-swagger-router-action: destroy operationId: destroyPermission parameters: - $ref: "#/components/parameters/UsernamePath" - $ref: "#/components/parameters/PermTypePath" - $ref: "#/components/parameters/PermTypeIDPath" - $ref: "#/components/parameters/IDPath" tags: - Permissions responses: "200": description: Deleted Permission successfully content: application/json: schema: type: string text/csv: schema: type: string "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error /webhooks/feed/:token: post: summary: Send data to a feed via webhook URL. description: "" x-swagger-router-controller: WebhookReceivers x-swagger-router-action: create x-code-samples: - lang: curl source: curl -F 'value=65.5' https://io.adafruit.com/api/v2/webhooks/feed/12345thistoken operationId: createWebhookFeedData requestBody: content: application/json: schema: type: object properties: value: type: string application/x-www-form-urlencoded: schema: type: object properties: value: type: string description: Webhook payload containing data `value` parameter. required: true tags: - Webhooks - Data responses: "200": description: New feed data record content: application/json: schema: $ref: "#/components/schemas/Data" text/csv: schema: $ref: "#/components/schemas/Data" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error /webhooks/feed/:token/raw: post: summary: Send arbitrary data to a feed via webhook URL. description: The raw data webhook receiver accepts POST requests and stores the raw request body on your feed. This is useful when you don't have control of the webhook sender. If feed history is turned on, payloads will be truncated at 1024 bytes. If feed history is turned off, payloads will be truncated at 100KB. x-swagger-router-controller: WebhookReceivers x-swagger-router-action: createRaw x-code-samples: - lang: curl source: |- curl --header 'Content-Type: application/json' \ --request POST \ --data '{"some json": "goes here", "id": 12345}' \ https://io.adafruit.com/api/v2/webhooks/feed/12345thistoken/raw operationId: createRawWebhookFeedData tags: - Webhooks - Data responses: "200": description: New feed data record content: application/json: schema: $ref: "#/components/schemas/Data" text/csv: schema: $ref: "#/components/schemas/Data" "401": description: Unauthorized "403": description: Forbidden "404": description: Not Found "500": description: Server Error servers: - url: https://io.adafruit.com/api/v2 - url: http://io.adafruit.com/api/v2 components: parameters: PermTypePath: name: type in: path required: true schema: type: string PermTypeIDPath: name: type_id in: path required: true schema: type: string StartTime: name: start_time in: query description: Start time for filtering, returns records created after given time. schema: type: string format: date-time EndTime: name: end_time in: query description: End time for filtering, returns records created before give time. schema: type: string format: date-time Limit: name: limit in: query description: Limit the number of records returned. schema: type: integer DataInclude: name: include in: query description: "List of Data record fields to include in response as comma separated list. Acceptable values are: `value`, `lat`, `lon`, `ele`, `id`, and `created_at`. " schema: type: string UsernamePath: name: username in: path required: true description: a valid username string schema: type: string ActivityTypePath: name: type in: path required: true schema: type: string FeedPath: name: feed_key description: a valid feed key in: path required: true schema: type: string FeedParam: name: feed_key in: query schema: type: string GroupPath: name: group_key in: path required: true schema: type: string GroupParam: name: group_key in: query schema: type: string IDPath: name: id in: path required: true schema: type: string DashboardIDPath: name: dashboard_id in: path required: true schema: type: string requestBodies: createFeedFeed: content: application/json: schema: type: object properties: name: type: string key: type: string description: type: string license: type: string application/x-www-form-urlencoded: schema: type: object properties: name: type: string key: type: string description: type: string license: type: string required: true batchCreateDataData: content: application/json: schema: type: array items: type: object properties: value: type: string created_at: type: string format: dateTime lat: type: string lon: type: string ele: type: string epoch: type: number application/x-www-form-urlencoded: schema: type: array items: type: object properties: value: type: string created_at: type: string format: dateTime lat: type: string lon: type: string ele: type: string epoch: type: number description: "A collection of data records including `value` (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string)." required: true createPermissionPermission: content: application/json: schema: type: object properties: mode: type: string default: r enum: - r - w - rw scope: type: string default: public enum: - secret - public - user - organization scope_value: type: string application/x-www-form-urlencoded: schema: type: object properties: mode: type: string default: r enum: - r - w - rw scope: type: string default: public enum: - secret - public - user - organization scope_value: type: string required: true createDashboardDashboard: content: application/json: schema: type: object properties: name: type: string description: type: string key: type: string application/x-www-form-urlencoded: schema: type: object properties: name: type: string description: type: string key: type: string required: true createGroupGroup: content: application/json: schema: type: object properties: name: type: string description: type: string key: type: string application/x-www-form-urlencoded: schema: type: object properties: name: type: string description: type: string key: type: string required: true x-examples: application/json: '{"name":"Some Group", "description":"A collection of feeds"}' default: '{"name":"Some Group","description":"A collection of feeds"}' createDataDatum: content: application/json: schema: type: object properties: value: type: string created_at: type: string format: dateTime lat: type: string lon: type: string ele: type: string epoch: type: number application/x-www-form-urlencoded: schema: type: object properties: value: type: string created_at: type: string format: dateTime lat: type: string lon: type: string ele: type: string epoch: type: number description: "Data record including a `value` field (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string)." required: true createBlockBlock: content: application/json: schema: type: object properties: name: type: string description: type: string key: type: string dashboard_id: type: number visual_type: type: string column: type: number row: type: number size_x: type: number size_y: type: number block_feeds: type: array items: type: object properties: feed_id: type: string group_id: type: string properties: type: object application/x-www-form-urlencoded: schema: type: object properties: name: type: string description: type: string key: type: string dashboard_id: type: number visual_type: type: string column: type: number row: type: number size_x: type: number size_y: type: number block_feeds: type: array items: type: object properties: feed_id: type: string group_id: type: string properties: type: object required: true createTokenToken: content: application/json: schema: type: object properties: token: type: string application/x-www-form-urlencoded: schema: type: object properties: token: type: string required: true createTriggerTrigger: content: application/json: schema: type: object properties: name: type: string application/x-www-form-urlencoded: schema: type: object properties: name: type: string required: true securitySchemes: HeaderKey: description: The AIO Key is used to restrict or grant access to your data. The key is unique, and you can generate a key per feed, and control it in many different ways. The easiest process is to just use your automatically generated master key. You can access this key right from the right-hand side of your dashboard or from an individual feed page. type: apiKey in: header name: X-AIO-Key QueryKey: description: The AIO Key is used to restrict or grant access to your data. The key is unique, and you can generate a key per feed, and control it in many different ways. The easiest process is to just use your automatically generated master key. You can access this key right from the right-hand side of your dashboard or from an individual feed page. type: apiKey in: query name: X-AIO-Key HeaderSignature: description: The AIO Signature is an AWS inspired request signature. type: apiKey in: header name: X-AIO-Signature schemas: Error: type: object properties: code: type: string message: type: string Activity: type: object properties: id: type: number readOnly: true action: type: string readOnly: true model: type: string readOnly: true data: type: object readOnly: true user_id: type: number readOnly: true created_at: type: string format: dateTime readOnly: true updated_at: type: string format: dateTime readOnly: true User: type: object properties: id: type: number readOnly: true name: type: string readOnly: true color: type: string readOnly: true username: type: string readOnly: true time_zone: type: string readOnly: true created_at: type: string format: dateTime readOnly: true updated_at: type: string format: dateTime readOnly: true Group: type: object properties: id: type: number readOnly: true name: type: string description: type: string feeds: type: array readOnly: true items: $ref: "#/components/schemas/Feed" created_at: type: string readOnly: true updated_at: readOnly: true type: string ShallowGroup: type: object properties: id: type: number readOnly: true name: type: string description: type: string created_at: type: string readOnly: true updated_at: readOnly: true type: string Feed: type: object properties: id: type: number readOnly: true name: type: string key: type: string group: type: object readOnly: true additionalProperties: $ref: "#/components/schemas/ShallowGroup" groups: type: array readOnly: true items: $ref: "#/components/schemas/ShallowGroup" description: type: string details: type: object description: Additional details about this feed. readOnly: true properties: shared_with: type: array description: Access control list for this feed items: type: object data: type: object properties: first: type: object additionalProperties: $ref: "#/components/schemas/Data" last: type: object additionalProperties: $ref: "#/components/schemas/Data" count: type: integer description: Number of data points stored by this feed. unit_type: type: string unit_symbol: type: string history: type: boolean visibility: type: string default: private enum: - private - public license: type: string enabled: type: boolean readOnly: true last_value: type: string readOnly: true status: type: string readOnly: true status_notify: type: boolean description: Is status notification active? status_timeout: type: integer description: Status notification timeout in minutes. created_at: type: string readOnly: true updated_at: type: string readOnly: true Permission: type: object properties: id: type: number readOnly: true user_id: readOnly: true type: number scope: type: string default: public enum: - secret - public - user - organization scope_value: type: string model: type: string default: feed enum: - feed - group - dashboard object_id: type: number created_at: readOnly: true type: string updated_at: readOnly: true type: string Data: type: object properties: id: type: string readOnly: true value: type: string feed_id: type: number group_id: readOnly: true type: number expiration: type: string lat: type: number lon: type: number ele: type: number completed_at: readOnly: true type: string created_at: readOnly: true type: string updated_at: readOnly: true type: string created_epoch: readOnly: true type: number DataResponse: type: object properties: id: type: string value: type: string feed_id: type: number group_id: type: number expiration: type: string lat: type: number lon: type: number ele: type: number completed_at: type: string created_at: type: string updated_at: type: string created_epoch: type: number Dashboard: type: object properties: name: type: string description: type: string key: type: string blocks: type: array readOnly: true items: $ref: "#/components/schemas/Block" Block: type: object properties: name: type: string description: type: string key: type: string visual_type: type: string column: type: number row: type: number size_x: type: number size_y: type: number block_feeds: type: array readOnly: true items: $ref: "#/components/schemas/BlockFeed" BlockFeed: type: object properties: id: type: string feed: $ref: "#/components/schemas/Feed" group: $ref: "#/components/schemas/Group" Token: type: object properties: token: type: string Trigger: type: object properties: name: type: string