-
Notifications
You must be signed in to change notification settings - Fork 1
/
ambient-weather.postman_collection.json
79 lines (79 loc) · 3.88 KB
/
ambient-weather.postman_collection.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
"info": {
"_postman_id": "dab35e07-5b59-496b-bc62-136ed206993c",
"name": "Ambient Weather",
"description": "##### This local documentation is a copy of [https://ambientweather.docs.apiary.io/#]() please refer to that link for the most up-to-date information.\n\nI have omitted the connector library list. You can generate code for just about any language right from Postman.\n\n## Authentication\n\nTwo API Keys are required for all REST API requests:\n\n- `applicationKey` - identifies the developer / application. To create an application key please login to your AmbientWeather.net account page ([https://ambientweather.net/account]())\n- `apiKey` - grants access to past/present data for a given \n user's devices. A typical consumer-facing application will initially \n ask the user to create an `apiKey` on their AmbientWeather.net account page ([https://ambientweather.net/account]()) \n and paste it into the app. Developers for personal or in-house apps \n will also need to create an apiKey on their own account page.\n \n\n## Rate Limiting\n\nAPI requests are capped at 1 request/second for each user's apiKey \nand 3 requests/second per applicationKey. When this limit is exceeded, \nthe API will return a 429 response code. Please be kind to our servers \n:)## Data Timing\n\nThe devices returned from the `/devices` endpoint contain a `lastData` \nparameter that contains the most up-to-date data we have for the \ndevice. Most devices update every minute, some update less frequently. \nThe timestamps are rounded to the nearest minute.\n\nQueries for past data using the `/devices/:macAddress` \nendpoint are returned in 5 minute or 30 minute increments. There can be \nup to a 10 minute delay before the most recent data becomes available. \nIf you need up-to-the-minute data please use the `/devices` endpoint or _forthcoming_ realtime API.\n\n## HTTP Response Codes\n\n(non-comprehensive list - just the ones I've seen)\n\n- 200: Success - You should get data back\n- 429: Rate Limit Exceeded\n- 401: Invalid API Key\n ## Other Resources\n\n- API Wiki - [https://github.com/ambient-weather/api-docs/wiki]()\n- [Device]() Data Specifications: [https://github.com/ambient-weather/api-docs/wiki/Device-Data-Specs]()",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "13847857"
},
"item": [
{
"name": "Devices",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/devices/?apiKey={{api_key}}&applicationKey={{application_key}}",
"host": [
"{{url}}"
],
"path": [
"devices",
""
],
"query": [
{
"key": "apiKey",
"value": "{{api_key}}"
},
{
"key": "applicationKey",
"value": "{{application_key}}"
}
]
},
"description": "Provides a list of the user's available devices along with each device's most recent data."
},
"response": []
},
{
"name": "Device Data",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/devices/{{macAddress}}?apiKey={{api_key}}&applicationKey={{application_key}}&limit=1&end_date={{$timestamp}}",
"host": [
"{{url}}"
],
"path": [
"devices",
"{{macAddress}}"
],
"query": [
{
"key": "apiKey",
"value": "{{api_key}}"
},
{
"key": "applicationKey",
"value": "{{application_key}}"
},
{
"key": "limit",
"value": "1",
"description": "max - 288"
},
{
"key": "end_date",
"value": "{{$timestamp}}",
"description": "epoch in milliseconds"
}
]
},
"description": "Fetch data for a given device. Data is stored in 5 or 30 minute increments. A list of all possible fields is here: [https://github.com/ambient-weather/api-docs/wiki/Device-Data-Specs]()"
},
"response": []
}
]
}