{ "opencollection": "1.0.0", "info": { "name": "Adafruit IO REST Activities Data API", "version": "2.0.0" }, "request": { "auth": { "type": "apikey", "key": "X-AIO-Key", "value": "{{X-AIO-Key}}", "placement": "header" } }, "items": [ { "info": { "name": "Data", "type": "folder" }, "items": [ { "info": { "name": "Get all data for the given feed", "type": "http" }, "http": { "method": "GET", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "start_time", "value": "", "type": "query", "description": "Start time for filtering, returns records created after given time." }, { "name": "end_time", "value": "", "type": "query", "description": "End time for filtering, returns records created before give time." }, { "name": "limit", "value": "", "type": "query", "description": "Limit the number of records returned." }, { "name": "include", "value": "", "type": "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`. " } ] }, "docs": "Get all data for the given feed" }, { "info": { "name": "Create new Data", "type": "http" }, "http": { "method": "POST", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Create new data records on the given feed.\n\n**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." }, { "info": { "name": "Chart data for current feed", "type": "http" }, "http": { "method": "GET", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/chart", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "start_time", "value": "", "type": "query", "description": "Start time for filtering, returns records created after given time." }, { "name": "end_time", "value": "", "type": "query", "description": "End time for filtering, returns records created before give time." }, { "name": "resolution", "value": "", "type": "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." }, { "name": "hours", "value": "", "type": "query", "description": "The number of hours the chart should cover." } ] }, "docs": "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.\n\nAll time-based parameters are optional, if none are given it will default to 1 hour at the finest-grained resolution possible." }, { "info": { "name": "Create multiple new Data records", "type": "http" }, "http": { "method": "POST", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/batch", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Create multiple new Data records" }, { "info": { "name": "Previous Data in Queue", "type": "http" }, "http": { "method": "GET", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/previous", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "include", "value": "", "type": "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`. " } ] }, "docs": "Get the previously processed data point in the feed. NOTE: this method doesn't move the processing queue pointer." }, { "info": { "name": "Next Data in Queue", "type": "http" }, "http": { "method": "GET", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/next", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "include", "value": "", "type": "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`. " } ] }, "docs": "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." }, { "info": { "name": "Last Data in Queue", "type": "http" }, "http": { "method": "GET", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/last", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "include", "value": "", "type": "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`. " } ] }, "docs": "Get the most recent data point in the feed. This request sets the queue pointer to the end of the feed." }, { "info": { "name": "First Data in Queue", "type": "http" }, "http": { "method": "GET", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/first", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "include", "value": "", "type": "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`. " } ] }, "docs": "Get the oldest data point in the feed. This request sets the queue pointer to the beginning of the feed." }, { "info": { "name": "Last Data in MQTT CSV format", "type": "http" }, "http": { "method": "GET", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/retain", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" } ] }, "docs": "Get the most recent data point in the feed in an MQTT compatible CSV format: `value,lat,lon,ele`" }, { "info": { "name": "Returns data based on feed key", "type": "http" }, "http": { "method": "GET", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/:id", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "id", "value": "", "type": "path" }, { "name": "include", "value": "", "type": "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`. " } ] }, "docs": "Returns data based on feed key" }, { "info": { "name": "Replace existing Data", "type": "http" }, "http": { "method": "PUT", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/:id", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Replace existing Data" }, { "info": { "name": "Update properties of existing Data", "type": "http" }, "http": { "method": "PATCH", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/:id", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Update properties of existing Data" }, { "info": { "name": "Delete existing Data", "type": "http" }, "http": { "method": "DELETE", "url": "https://io.adafruit.com/api/v2/:username/feeds/:feed_key/data/:id", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "id", "value": "", "type": "path" } ] }, "docs": "Delete existing Data" }, { "info": { "name": "Create new data for multiple feeds in a group", "type": "http" }, "http": { "method": "POST", "url": "https://io.adafruit.com/api/v2/:username/groups/:group_key/data", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "group_key", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Create new data for multiple feeds in a group" }, { "info": { "name": "All data for current feed in a specific group", "type": "http" }, "http": { "method": "GET", "url": "https://io.adafruit.com/api/v2/:username/groups/:group_key/feeds/:feed_key/data", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "group_key", "value": "", "type": "path" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" }, { "name": "start_time", "value": "", "type": "query", "description": "Start time for filtering data. Returns data created after given time." }, { "name": "end_time", "value": "", "type": "query", "description": "End time for filtering data. Returns data created before give time." }, { "name": "limit", "value": "", "type": "query", "description": "Limit the number of records returned." } ] }, "docs": "All data for current feed in a specific group" }, { "info": { "name": "Create new Data in a feed belonging to a particular group", "type": "http" }, "http": { "method": "POST", "url": "https://io.adafruit.com/api/v2/:username/groups/:group_key/feeds/:feed_key/data", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "group_key", "value": "", "type": "path" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Create new Data in a feed belonging to a particular group" }, { "info": { "name": "Create multiple new Data records in a feed belonging to a particular group", "type": "http" }, "http": { "method": "POST", "url": "https://io.adafruit.com/api/v2/:username/groups/:group_key/feeds/:feed_key/data/batch", "params": [ { "name": "username", "value": "", "type": "path", "description": "a valid username string" }, { "name": "group_key", "value": "", "type": "path" }, { "name": "feed_key", "value": "", "type": "path", "description": "a valid feed key" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Create multiple new Data records in a feed belonging to a particular group" }, { "info": { "name": "Send data to a feed via webhook URL.", "type": "http" }, "http": { "method": "POST", "url": "https://io.adafruit.com/api/v2/webhooks/feed/:token", "body": { "type": "json", "data": "{}" } }, "docs": "Send data to a feed via webhook URL." }, { "info": { "name": "Send arbitrary data to a feed via webhook URL.", "type": "http" }, "http": { "method": "POST", "url": "https://io.adafruit.com/api/v2/webhooks/feed/:token/raw" }, "docs": "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." } ] } ], "bundled": true }