Compare commits

...

19 commits

Author SHA1 Message Date
Loren Norman
1a6b52804e replace bad endpoint URL (copypasta?) 2025-05-27 12:59:07 -04:00
Tyeth Gundry
96d1685a41
Merge pull request #71 from adafruit/tyeth/issue69
Swap to double quotes for basic example
2025-04-22 16:02:21 +01:00
Tyeth Gundry
2b820602e4
Merge pull request #70 from adafruit/dependabot/bundler/nokogiri-1.18.8
Bump nokogiri from 1.18.3 to 1.18.8
2025-04-22 16:01:30 +01:00
Tyeth Gundry
30bff79e17
Swap to double quotes for basic example
This closes #69
2025-04-22 15:54:01 +01:00
dependabot[bot]
7d97b17e8b
Bump nokogiri from 1.18.3 to 1.18.8
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.18.3 to 1.18.8.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.18.3...v1.18.8)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-version: 1.18.8
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-22 04:46:48 +00:00
Brent Rubell
ffc0e7c72e
Merge pull request #67 from adafruit/dependabot/bundler/rack-2.2.13
Bump rack from 2.2.11 to 2.2.13
2025-03-11 08:53:43 -05:00
dependabot[bot]
658236e4ea
Bump rack from 2.2.11 to 2.2.13
Bumps [rack](https://github.com/rack/rack) from 2.2.11 to 2.2.13.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.11...v2.2.13)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-11 02:44:50 +00:00
Justin Cooper
30cf3a8891
upgrade actions/cache to v4 2025-03-04 09:36:35 -06:00
Justin Cooper
6a64b40038
Merge pull request #65 from adafruit/dependabot/bundler/rack-2.2.11
Bump rack from 2.2.8.1 to 2.2.11
2025-03-04 09:25:29 -06:00
dependabot[bot]
add1bd9242
Bump rack from 2.2.8.1 to 2.2.11
Bumps [rack](https://github.com/rack/rack) from 2.2.8.1 to 2.2.11.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.8.1...v2.2.11)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-04 15:24:26 +00:00
Justin Cooper
628bb91e9a
Merge pull request #66 from adafruit/dependabot/bundler/nokogiri-1.18.3
Bump nokogiri from 1.16.5 to 1.18.3
2025-03-04 09:23:15 -06:00
Brent Rubell
3ada13e6f9
Merge pull request #62 from adafruit/tyeth/issue57
Add message for HTTP response 422 to _errors.md
2025-02-24 09:03:32 -06:00
dependabot[bot]
67d3176588
Bump nokogiri from 1.16.5 to 1.18.3
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.5 to 1.18.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.18.3/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.16.5...v1.18.3)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-19 12:43:54 +00:00
dependabot[bot]
f9ed8381c1
Merge pull request #64 from adafruit/dependabot/bundler/rexml-3.3.9 2024-10-29 17:38:29 +00:00
dependabot[bot]
2f8e67aa61
Bump rexml from 3.3.6 to 3.3.9
Bumps [rexml](https://github.com/ruby/rexml) from 3.3.6 to 3.3.9.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.3.6...v3.3.9)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 18:53:53 +00:00
Brent Rubell
47d2ddb964
Merge pull request #63 from adafruit/issue-50-update-key-images
Issue-50-update-key-images
2024-10-24 09:06:18 -05:00
Brent Rubell
47837d08b4
Merge pull request #61 from adafruit/tyeth/issue58
Datums - Update parameter tables for datum endpoints
2024-10-24 09:05:26 -05:00
tyeth
2f8db6bc91 Datums - Update parameter tables for datum endpoints
Adds instructions about submitting multiple data points in one operation.
Swaps the parameter name from datum to "Request Body" for single data endpoints.
Fixes #58
2024-10-24 09:24:33 +01:00
tyeth
27db9847df Add message for HTTP response 422 to _errors.md 2024-10-23 15:54:44 +01:00
8 changed files with 23 additions and 22 deletions

View file

@ -17,7 +17,7 @@ jobs:
with:
ruby-version: ${{ env.ruby-version }}
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: vendor/bundle
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}

View file

@ -7,8 +7,8 @@ gem 'middleman', '~> 4.5.0'
gem 'middleman-autoprefixer', '~> 3.0.0'
gem 'middleman-sprockets', '~> 4.1.1'
gem 'middleman-syntax', '~> 3.2.0'
gem 'nokogiri', '~> 1.16.5'
gem 'rack', '~> 2.2.8'
gem 'nokogiri', '~> 1.18.8'
gem 'rack', '~> 2.2.13'
gem 'redcarpet', '~> 3.6.0'
gem 'rouge', '~> 3.30.0'

View file

@ -79,9 +79,9 @@ GEM
middleman-syntax (3.2.0)
middleman-core (>= 3.2)
rouge (~> 3.2)
mini_portile2 (2.8.6)
mini_portile2 (2.8.8)
minitest (5.20.0)
nokogiri (1.16.5)
nokogiri (1.18.8)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
padrino-helpers (0.15.3)
@ -92,14 +92,13 @@ GEM
parallel (1.23.0)
parslet (2.0.0)
public_suffix (5.0.3)
racc (1.7.3)
rack (2.2.8.1)
racc (1.8.1)
rack (2.2.13)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.6.0)
rexml (3.3.6)
strscan
rexml (3.3.9)
rouge (3.30.0)
sassc (2.4.0)
ffi (~> 1.9)
@ -107,7 +106,6 @@ GEM
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
strscan (3.1.0)
temple (0.10.3)
thor (1.2.2)
tilt (2.0.11)
@ -129,8 +127,8 @@ DEPENDENCIES
middleman-autoprefixer (~> 3.0.0)
middleman-sprockets (~> 4.1.1)
middleman-syntax (~> 3.2.0)
nokogiri (~> 1.16.5)
rack (~> 2.2.8)
nokogiri (~> 1.18.8)
rack (~> 2.2.13)
redcarpet (~> 3.6.0)
rouge (~> 3.30.0)

View file

@ -9,6 +9,7 @@ Error Code | Meaning
403 | Forbidden -- This action is not permitted.
404 | Not Found -- The specified record could not be found.
406 | Not Acceptable -- You requested a format that we don't serve.
422 | Unprocessable Entity -- You've sent data we can't accept/understand. Is the value field (string/number) missing?
429 | Too Many Requests -- You're sending or requesting data too quickly! Slow down!
500 | Internal Server Error -- We had a problem with our server. Try again later.
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

View file

@ -88,4 +88,4 @@ atob("eyJzb21ldGhpbmciOiJoZXJlIn0=")
```
<% end %>
This solution is also ideal if you want to store or send binary data with Adafruit IO. You won't get to see any pretty charts, but your data will remain exactly the way you left it.
This solution is also ideal if you want to store or send binary data with Adafruit IO. You won't get to see any pretty charts (although we do display base64 encoded images), but your data will remain exactly the way you left it.

View file

@ -6,7 +6,7 @@ You can create, read, update, or delete data records. Every **CREATE**, **UPDATE
Data points belong to feeds, so every Data API call starts with a Feed URL.
Note that there are endpoints for submitting multiple data points to a feed, and multiple feed values to a group, see **feeds/{feed_key}/batch** and **groups/{groupname}/data** endpoints.
## Create Data
@ -14,8 +14,8 @@ Data points belong to feeds, so every Data API call starts with a Feed URL.
> <div class="http"><span class="method-post">POST</span><code class="path">/api/v2/{username}/feeds/{feed_key}/data</code></div>
```shell
# Send new data with a value of 42
$ curl -F 'value=42' -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/feeds/{feed_key}/data
# Send new data with a value of 42 (note: using single quotes instead prevents variable expansion etc in bash)
$ curl -F "value=42" -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/feeds/{feed_key}/data
# Send new data with a value of 42 and include optional location metadata
curl -H "Content-Type: application/json" -d '{"value": 42, "lat": 23.1, "lon": "-73.3"}' -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/feeds/{feed_key}/data
@ -76,7 +76,7 @@ feed_key | string | true | a valid feed key
Parameter | Type | Required | Description
--------- | ------- | --------- | -----------------------
datum | object | true | 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).
<b>Request Body</b> | object | true | Data record (datum) including a `value` field (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string).
@ -562,7 +562,7 @@ id | string | true |
Parameter | Type | Required | Description
--------- | ------- | --------- | -----------------------
datum | object | true | 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).
<b>Request Body</b> | object | true | Data record (datum) including a `value` field (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string).
@ -655,8 +655,8 @@ Example for `group_feed_data` in the body is as follows: `{ feeds: [ { key: stri
> <div class="http"><span class="method-get">GET</span><code class="path">/api/v2/{username}/groups/{group_key}/feeds/{feed_key}/data</code></div>
```shell
# Send new data with a value of 42 to the group's feeds as json
$ curl -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/groups/{group_key}/data.json -d '{"feeds":[{"key":"{feed_key}","value":42}]}'
# Get data from the given Feed in the given Group
$ curl -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/groups/{group_key}/feeds/{feed_key}/data
```
```python
@ -724,7 +724,7 @@ feed_key | string | true | a valid feed key
Parameter | Type | Required | Description
--------- | ------- | --------- | -----------------------
datum | object | true | 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).
<b>Request Body</b> | object | true | Data record (datum) including a `value` field (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string).
@ -767,4 +767,3 @@ feed_key | string | true | a valid feed key
Parameter | Type | Required | Description
--------- | ------- | --------- | -----------------------
data | array | true | 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).

View file

@ -6,6 +6,8 @@ You will need to create one feed for each unique source of data you send to Adaf
You can create, read, update, or delete feeds. Every **CREATE**, **UPDATE**, or **DELETE** action on a feed record counts against your rate limit.
There are also endpoints for submitting multiple data points to a feed, or multiple feed values to a group, see **feeds/{feed_key}/batch** and **groups/{groupname}/data** endpoints.
## All Feeds
> HTTP Request

View file

@ -53,6 +53,7 @@ For example, if you are building a weather station, you would add feeds for `hum
You can create, read, update, or delete group records. Every **CREATE**, **UPDATE**, or **DELETE** action on a group record counts against your rate limit.
There is also an endpoint for submitting multiple feed values to a group, see the **groups/{groupname}/data** endpoint.
## Get All Groups