Locations

List All Locations

Request:

GET /api/weather/locations

Response:

// 200 OK
{
    "locations": [
        {
            "id": 1,
            "name": "Base",
            "slug": "base",
            "elevation": 8560,
            "created_at": "2019-10-05 15:58:01",
            "updated_at": "2019-10-05 15:58:01"
        },
        {
            "id": 2,
            "name": "Mid Mountain",
            "slug": "mid-mountain",
            "elevation": 9662,
            "created_at": "2019-10-05 15:58:02",
            "updated_at": "2019-10-05 15:58:02"
        },
        {
            "id": 3,
            "name": "Top of Collins",
            "slug": "top-of-collins",
            "elevation": 10443,
            "created_at": "2019-10-05 15:58:03",
            "updated_at": "2019-10-05 15:58:03"
        }
    ]
}
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
Code Status ?
200 OK 👍
401 Unauthorized 👎
404 Not Found 👎
500 Server Error 💥

Get Location

Request:

GET /api/weather/locations/{id}

Response:

// 200 OK
{
    "location": {
        "id": 2,
        "name": "Mid Mountain",
        "slug": "mid-mountain",
        "elevation": 9662,
        "created_at": "2019-10-05 15:58:02",
        "updated_at": "2019-10-05 15:58:02"
    }
}
1
2
3
4
5
6
7
8
9
10
11
Code Status ?
200 OK 👍
401 Unauthorized 👎
404 Not Found 👎
500 Server Error 💥

Current Weather

List All Current Weather

Request:

GET /api/weather/current

Response:

// 200 OK
{
    "currentWeather": [
        {
            "id": 4,
            "dated_at": "2019-10-05 07:00:00",
            "last12": "34.9",
            "last24": "35.5",
            "base_depth": "160.6",
            "storm_total": "90.3",
            "year_to_date": "211.9",
            "base_temp": "38.8",
            "mid_temp": "31.9",
            "top_temp": "39.1",
            "wind_direction": "31.7",
            "wind_speed": "33.9",
            "notes": "Mock Turtle. 'Very much indeed,' said Alice. 'Of course not,' said the Pigeon in a minute. Alice began to repeat it, but her voice sounded hoarse and strange, and the blades of grass, but she could remember them, all these strange Adventures of.",
            "created_at": "2019-10-05 19:05:27",
            "updated_at": "2019-10-05 19:05:27"
        },
        {
            "id": 5,
            "dated_at": "2019-10-05 08:00:00",
            "last12": "35.8",
            "last24": "39.5",
            "base_depth": "159.8",
            "storm_total": "86.8",
            "year_to_date": "438.4",
            "base_temp": "34.9",
            "mid_temp": "35.0",
            "top_temp": "37.3",
            "wind_direction": "33.5",
            "wind_speed": "30.4",
            "notes": "I think it would feel very queer to ME.' 'You!' said the Hatter. 'Stolen!' the King sharply. 'Do you know that cats COULD grin.' 'They all can,' said the Cat. 'Do you know what to uglify is, you ARE a simpleton.' Alice did not feel encouraged to.",
            "created_at": "2019-10-05 19:05:27",
            "updated_at": "2019-10-05 19:05:27"
        },
        {
            "id": 6,
            "dated_at": "2019-10-05 09:00:00",
            "last12": "37.8",
            "last24": "32.6",
            "base_depth": "104.1",
            "storm_total": "104.7",
            "year_to_date": "356.4",
            "base_temp": "31.8",
            "mid_temp": "30.4",
            "top_temp": "34.7",
            "wind_direction": "30.1",
            "wind_speed": "39.3",
            "notes": "Queen said to herself, in a tone of delight, and rushed at the other, looking uneasily at the Hatter, and, just as if it makes me grow large again, for she was appealed to by the fire, stirring a large mushroom growing near her, she began, in a.",
            "created_at": "2019-10-05 19:05:27",
            "updated_at": "2019-10-05 19:05:27"
        },
        ...
    ]
}
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
Code Status ?
200 OK 👍
401 Unauthorized 👎
404 Not Found 👎
500 Server Error 💥

Create Current Weather

Request:

POST /api/weather/current
{
    "dated_at": "2019-10-07 08:00:00",
    "last12": "35.1",
    "last24": "45.5",
    "base_depth": "166.9",
    "storm_total": "99.9",
    "year_to_date": "555.5",
    "base_temp": "34.9",
    "mid_temp": "35.0",
    "top_temp": "37.3",
    "wind_direction": "33.5",
    "wind_speed": "30.4",
    "notes": "Notes ..."
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Response:

// 201 Created
{
    "currentWeather": {
        "dated_at": "2019-10-07 08:00:00",
        "last12": "35.1",
        "last24": "45.5",
        "base_depth": "166.9",
        "storm_total": "99.9",
        "year_to_date": "555.5",
        "base_temp": "34.9",
        "mid_temp": "35.0",
        "top_temp": "37.3",
        "wind_direction": "33.5",
        "wind_speed": "30.4",
        "notes": "Notes ...",
        "updated_at": "2019-10-07 18:43:23",
        "created_at": "2019-10-07 18:43:23",
        "id": 7
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Code Status ?
201 Created 👍
401 Unauthorized 👎
404 Not Found 👎
417 Expectation Failed 👎
422 Validation Failed 👎
500 Server Error 💥

Get Current Weather

Request:

GET /api/weather/current/{id}

Response:

// 200 OK
{
    "currentWeather": {
        "id": 5,
        "dated_at": "2019-10-05 08:00:00",
        "last12": "35.8",
        "last24": "39.5",
        "base_depth": "159.8",
        "storm_total": "86.8",
        "year_to_date": "438.4",
        "base_temp": "34.9",
        "mid_temp": "35.0",
        "top_temp": "37.3",
        "wind_direction": "33.5",
        "wind_speed": "30.4",
        "notes": "I think it would feel very queer to ME.' 'You!' said the Hatter. 'Stolen!' the King sharply. 'Do you know that cats COULD grin.' 'They all can,' said the Cat. 'Do you know what to uglify is, you ARE a simpleton.' Alice did not feel encouraged to.",
        "created_at": "2019-10-05 19:05:27",
        "updated_at": "2019-10-05 19:05:27"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Code Status ?
200 OK 👍
401 Unauthorized 👎
404 Not Found 👎
500 Server Error 💥

Update Current Weather

Request:

PUT /api/weather/current/{id}
// PUT /api/weather/current/7
{
    "dated_at": "2019-10-07 08:00:00",
    "last12": "35.1",
    "last24": "45.5",
    "base_depth": "166.9",
    "storm_total": "99.9",
    "year_to_date": "555.5",
    "base_temp": "34.9",
    "mid_temp": "35.0",
    "top_temp": "37.3",
    "wind_direction": "33.5",
    "wind_speed": "40.3",
    "notes": "More notes ..."
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Response:

// 202 Accepted
{
    "currentWeather": {
        "id": 7,
        "dated_at": "2019-10-07 08:00:00",
        "last12": "35.1",
        "last24": "45.5",
        "base_depth": "166.9",
        "storm_total": "99.9",
        "year_to_date": "555.5",
        "base_temp": "34.9",
        "mid_temp": "35.0",
        "top_temp": "37.3",
        "wind_direction": "33.5",
        "wind_speed": "40.3",
        "notes": "More notes ...",
        "created_at": "2019-10-07 18:43:23",
        "updated_at": "2019-10-07 18:47:12"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Code Status ?
202 Accepted 👍
401 Unauthorized 👎
404 Not Found 👎
417 Expectation Failed 👎
422 Validation Failed 👎
500 Server Error 💥

Delete Current Weather

Request:

DELETE /api/weather/current/{id}

Response:

// 204 No Content
{}
1
2
Code Status ?
204 No Content 👍
401 Unauthorized 👎
404 Not Found 👎
417 Expectation Failed 👎
500 Server Error 💥

Hourly Weather

List All Hourly Weather

Request:

GET /api/weather/hourly

Response:

// 200 OK
{
    "hourlyWeather": [
        {
            "id": 1,
            "dated_at": "2019-01-01 00:00:00",
            "temperature": "11.9",
            "snow": null,
            "water": null,
            "density": null,
            "wind_direction": "149.9",
            "wind_speed": "10.0",
            "notes": null,
            "location_id": 1,
            "created_at": "2019-10-05 19:05:21",
            "updated_at": "2019-10-05 19:05:21",
            "wind_speed_text": "Light",
            "wind_direction_text": "SSE"
        },
        {
            "id": 2,
            "dated_at": "2019-01-01 01:00:00",
            "temperature": "11.4",
            "snow": null,
            "water": null,
            "density": null,
            "wind_direction": "254.8",
            "wind_speed": "23.9",
            "notes": null,
            "location_id": 1,
            "created_at": "2019-10-05 19:05:21",
            "updated_at": "2019-10-05 19:05:21",
            "wind_speed_text": "Moderate",
            "wind_direction_text": "WSW"
        },
        {
            "id": 3,
            "dated_at": "2019-01-01 02:00:00",
            "temperature": "14.3",
            "snow": null,
            "water": null,
            "density": null,
            "wind_direction": "237.3",
            "wind_speed": "5.1",
            "notes": null,
            "location_id": 1,
            "created_at": "2019-10-05 19:05:21",
            "updated_at": "2019-10-05 19:05:21",
            "wind_speed_text": "Light",
            "wind_direction_text": "SW"
        },
        ...
    ]
}
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
Code Status ?
200 OK 👍
401 Unauthorized 👎
404 Not Found 👎
500 Server Error 💥

Create Hourly Weather

Request:

POST /api/weather/hourly
// POST /api/weather/hourly
{
    "dated_at": "2019-10-07 13:00:00",
    "temperature": "14.3",
    "wind_direction": "237.3",
    "wind_speed": "5.1",
    "notes": "Note: Null values ommitted.",
    "location_id": 1,
}
1
2
3
4
5
6
7
8
9

Response:

// 201 Created
{
    "hourlyWeather": {
        "dated_at": "2019-10-07 13:00:00",
        "temperature": "14.3",
        "wind_direction": "237.3",
        "wind_speed": "5.1",
        "notes": "Note: Null values ommitted.",
        "location_id": 1,
        "updated_at": "2019-10-07 19:22:02",
        "created_at": "2019-10-07 19:22:02",
        "id": 2238,
        "wind_speed_text": "Light",
        "wind_direction_text": "SW"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Code Status ?
201 Created 👍
401 Unauthorized 👎
404 Not Found 👎
417 Expectation Failed 👎
422 Validation Failed 👎
500 Server Error 💥

Get Hourly Weather

Request:

GET /api/weather/hourly/{id}

Response:

// 200 OK
{
    "hourlyWeather": {
        "id": 7,
        "dated_at": "2019-01-01 06:00:00",
        "temperature": "7.7",
        "snow": null,
        "water": null,
        "density": null,
        "wind_direction": "226.8",
        "wind_speed": "24.5",
        "notes": null,
        "location_id": 1,
        "created_at": "2019-10-05 19:05:21",
        "updated_at": "2019-10-05 19:05:21",
        "wind_speed_text": "Moderate",
        "wind_direction_text": "SW"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Code Status ?
200 OK 👍
401 Unauthorized 👎
404 Not Found 👎
500 Server Error 💥

Update Hourly Weather

Request:

PUT /api/weather/hourly/{id}
// PUT /api/weather/hourly/2238
{
    "dated_at": "2019-10-07 13:00:00",
    "temperature": "14.3",
    "snow": "3.3",
    "water": "0.12",
    "density": "32.22",
    "notes": "Note: Null values ommitted again.",
    "location_id": 2,
}
1
2
3
4
5
6
7
8
9
10

dated_at:2019-10-07 13:00:00 temperature:14.3 snow:3.3 water:0.12 density:32 notes:Note:Null values ommitted again. location_id:2

Response:

// 202 Accepted
{
    "hourlyWeather": {
        "id": 2238,
        "dated_at": "2019-10-07 13:00:00",
        "temperature": "14.3",
        "snow": "3.3",
        "water": "0.12",
        "density": "32.22",
        "wind_direction": "237.3",
        "wind_speed": "5.1",
        "notes": "Note:Null values ommitted again.",
        "location_id": 2,
        "created_at": "2019-10-07 19:22:02",
        "updated_at": "2019-10-07 19:30:42",
        "wind_speed_text": "Light",
        "wind_direction_text": "SW"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Code Status ?
202 Accepted 👍
401 Unauthorized 👎
404 Not Found 👎
417 Expectation Failed 👎
422 Validation Failed 👎
500 Server Error 💥

Delete Hourly Weather

Request:

DELETE /api/weather/hourly/{id}

Response:

// 204 No Content
{}
1
2
Code Status ?
204 No Content 👍
401 Unauthorized 👎
404 Not Found 👎
417 Expectation Failed 👎
500 Server Error 💥

Snowfall History

List All Snowfall History

Request:

GET /api/weather/snowfall-history

Response:

// 200 OK
{
    "snowfallHistory": [
        {
            "id": 81,
            "season": 20042005,
            "reported_at": "2004-10-17",
            "new_snow": "4.0",
            "new_water": "1.21",
            "density": "30.25",
            "storm_total": "4.0",
            "ytd_snow": "4.0",
            "ytd_water": "1.21",
            "created_at": "2004-10-17 00:00:00",
            "updated_at": "2004-10-17 00:00:00"
        },
        {
            "id": 82,
            "season": 20042005,
            "reported_at": "2004-10-18",
            "new_snow": "7.0",
            "new_water": "1.00",
            "density": "14.29",
            "storm_total": "11.0",
            "ytd_snow": "11.0",
            "ytd_water": "2.21",
            "created_at": "2004-10-18 00:00:00",
            "updated_at": "2004-10-18 00:00:00"
        },
        {
            "id": 83,
            "season": 20042005,
            "reported_at": "2004-10-19",
            "new_snow": "13.0",
            "new_water": "2.46",
            "density": "18.92",
            "storm_total": "24.0",
            "ytd_snow": "24.0",
            "ytd_water": "4.67",
            "created_at": "2004-10-19 00:00:00",
            "updated_at": "2004-10-19 00:00:00"
        },
        ...
    ]
}
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
Code Status ?
200 OK 👍
401 Unauthorized 👎
404 Not Found 👎
500 Server Error 💥

Create Snowfall History

Request:

POST /api/weather/snowfall-history
// POST /api/weather/snowfall-history
{
    season: 20192020,
    reported_at: 2019-10-05,
    new_snow: 4.0,
    new_water: 0.65,
    density: 16.25,
    storm_total: 4.0,
    ytd_snow: 4.0,
    ytd_water: 0.65
}
1
2
3
4
5
6
7
8
9
10
11

Response:

// 200 OK
{
    "snowfallHistory": {
        "season": 20192020,
        "reported_at": "2019-10-05",
        "new_snow": "4.0",
        "new_water": "0.65",
        "density": "16.25",
        "storm_total": "4.0",
        "ytd_snow": "4.0",
        "ytd_water": "0.65",
        "updated_at": "2019-10-06 00:05:16",
        "created_at": "2019-10-06 00:05:16",
        "id": 20053058
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Code Status ?
200 OK 👍
401 Unauthorized 👎
404 Not Found 👎
417 Expectation Failed 👎
422 Validation Failed 👎
500 Server Error 💥

Get Snowfall History

Request:

GET /api/weather/snowfall-history/{id}

Response:

// GET /api/weather/snowfall-history/20052947'"
// 200 OK
{
    "snowfallHistory": {
        "id": 20052947,
        "season": 20182019,
        "reported_at": "2018-10-05",
        "new_snow": "4.0",
        "new_water": "0.65",
        "density": "16.25",
        "storm_total": "4.0",
        "ytd_snow": "4.0",
        "ytd_water": "0.65",
        "created_at": "2018-11-01 07:40:35",
        "updated_at": "2018-11-01 07:40:35"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Code Status ?
200 OK 👍
401 Unauthorized 👎
404 Not Found 👎
500 Server Error 💥

Update Snowfall History

Request:

PUT /api/weather/snowfall-history/{id}
// PUT /api/weather/snowfall-history/20052947
{
    "season": 20182019,
    "reported_at": "2018-10-05",
    "new_snow": 5.0,
    "new_water": 0.65,
    "density": 16.25,
    "storm_total": 4.0,
    "ytd_snow": 4.0,
    "ytd_water": 0.65,
}
1
2
3
4
5
6
7
8
9
10
11

Response:

// 202 Accepted
{
    "snowfallHistory": {
        "id": 20052947,
        "season": 20182019,
        "reported_at": "2018-10-05",
        "new_snow": "5.0",
        "new_water": "0.65",
        "density": "16.25",
        "storm_total": "4.0",
        "ytd_snow": "4.0",
        "ytd_water": "0.65",
        "created_at": "2018-11-01 07:40:35",
        "updated_at": "2019-10-06 00:10:32"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Code Status ?
202 Accepted 👍
401 Unauthorized 👎
404 Not Found 👎
417 Expectation Failed 👎
422 Validation Failed 👎
500 Server Error 💥

Delete Snowfall History

Request:

DELETE /api/weather/snowfall-history/{id}

Response:

// 204 No Content
{}
1
2
Code Status ?
204 No Content 👍
401 Unauthorized 👎
404 Not Found 👎
417 Expectation Failed 👎
500 Server Error 💥