-
Notifications
You must be signed in to change notification settings - Fork 0
/
weather-history-devportal-apikey.yaml
178 lines (172 loc) · 5.95 KB
/
weather-history-devportal-apikey.yaml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# Example OpenAPI YAML to get you started quickly.
# Note: YAML has indentation based coping.
# Code completion support is available so start typing for
# available options.
# This example follows the recommendations of the API
# Improvement Proposals for common API patterns. Find more
# at https://google.aip.dev/
# Find the full OpenAPI reference at:
# https://github.com/OAI/OpenAPI-Specification
openapi: 3.0.3
# This is your document metadata.
info:
version: 1.0.0
title: Weather History by Station ID
description: An API for getting historical weather data. The data source is the NOAA CHCN datase. The GHCN-Daily is an integrated database of daily climate summaries from land surface stations across the globe, and is comprised of daily climate records from over 100,000 stations in 180 countries and territories, and includes some data from every year since 1763.
# Servers where this API is hosted
servers:
- url: https://apigeex.dlhdemo.com
components:
securitySchemes:
ApiKeyAuth: # arbitrary name for the security scheme
type: apiKey
in: header # can be "header", "query" or "cookie"
name: apikey # name of the header, query parameter or cookie
security:
- ApiKeyAuth: []
# Describe your paths here
paths:
# This is a endpoint path.
'/v1/weather-history/stations':
# This is an HTTP operation
get:
# Describe this verb here. Note: you can use markdown
summary: 'Find the IDs for weather stations located near a street address, landmark, or common name for a place.'
description: ''
# This is an array of GET operation parameters:
parameters:
# An example parameter that is in query and is required
- name: near
in: query
description: |
A street address, landmark, or common name for a place
schema:
type: string
default: Seattle, WA
# Expected responses for this operation:
responses:
# Response code
'200':
description: Object with list of matching stations near the place that matches the search
# Response body content.
content:
# JSON response with a schema referenced from the
# components object.
application/json:
schema:
type: object
properties:
address:
type: string
description: The address or place that was used in the search.
lat:
type: "number"
description: "The latitude of the matched place."
example: 39.8560963
lon:
type: "number"
description: "The longitude of the matched place."
example: -104.6737376
stations:
type: array
items:
properties:
id:
type: "string"
example: "US1CODN0073"
name:
type: "string"
example: "DIA 1.0 NE"
state:
type: "string"
example: "CO"
lat:
type: "number"
example: 39.8665
lon:
type: "number"
example: -104.6508
hcn_crn_flag:
type: "string"
example: "HCN"
distance:
type: "number"
example: 1.61
401:
description: "Unauthorized"
429:
description: "Quota violation, rate violation"
500:
description: "Server error"
default:
description: "a list of weather stations near the address"
'/v1/weather-history/stations/{station_id}/years/{year}/temp':
get:
summary: 'BigQuery - Get temperature data for a given station for a given year'
description: ''
parameters:
- name: 'apikey'
in: header
description: 'Your API key'
required: true
schema:
type: string
default: your-api-key
- name: year
in: path
description: 'year'
required: true
schema:
type: string
default: year
- name: station_id
in: path
description: 'Weather station id, use .../stations to find it'
required: true
schema:
type: string
default: USW00023169
responses:
200:
description: "Successful response"
401:
description: "Unauthorized"
429:
description: "Quota violation, rate violation"
500:
description: "Server error"
'/v1/weather-history/stations/{station_id}/years/{year}/wind':
get:
summary: 'BigQuery - Get wind data for a given station for a given year'
description: ''
parameters:
- name: 'apikey'
in: header
description: 'Your API key'
required: true
schema:
type: string
default: your-api-key
- name: year
in: path
description: 'year'
required: true
schema:
type: string
default: year
- name: station_id
in: path
description: 'Weather station id, use .../stations to find it'
required: true
schema:
type: string
default: USW00023169
responses:
200:
description: "Successful response"
401:
description: "Unauthorized"
429:
description: "Quota violation, rate violation"
500:
description: "Server error"