CDSS REST API Examples
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
View only
 
 
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
DWR REST Examples
2
In this Google Sheet, we’ll look at examples for consuming data from the Colorado Division of Water Resources’ REST API using Google Sheets.
3
4
Getting Started
5
To get started, you’ll need the following:
6
• REST API base URL (http://dnrweb.state.co.us/DWR/DwrApiService/api/v2/)
7
• REST API token (optional)
8
• Access to Google Sheets
9
10
Prerequisites
11
12
REST API Base URL
13
We’ll use the base URL for the REST API as a starting point to build our requests to get data. To get data for active administrative calls, we take the base URL and combine it with the administrative calls endpoint URL to create a fully qualified URL for our request.
14
15
16
17
18
19
20
21
22
23
24
25
26
We don’t have to construct these URLs manually. The Colorado Division of Water Resources’ REST API includes a user interface that lists the endpoints and URL generators for each endpoint.
27
28
REST API Endpoints List
29
URL Generator (Active Administrative Calls)
30
31
REST API Token
32
While not required to make request to the REST API, a valid token enables you to make more requests and get more data. Signing up for a token is free and easy. Learn more about it by following the link below.
33
34
Getting and Using a Token
35
36
Supported Spreadsheet Programs
37
The final prerequisite is access to a spreadsheet program. Our examples will focus specifically on Google Sheets.
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
Loading...
Main menu