Skip to content

Commit 6edae29

Browse files
krivardmelange396
authored andcommitted
API Keys: API Documentation (#1158)
1 parent 31eed17 commit 6edae29

File tree

8 files changed

+143
-5
lines changed

8 files changed

+143
-5
lines changed

docs/api/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Other Endpoints (COVID-19 and Other Diseases)
3-
nav_order: 2
3+
nav_order: 3
44
has_children: true
55
---
66

docs/api/api_keys.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: API Keys
3+
nav_order: 1
4+
has_children: true
5+
---
6+
7+
# Epidata API Keys
8+
9+
Anyone may access the Epidata API anonymously without providing any personal
10+
data. Anonymous API access is subject to the following restrictions:
11+
12+
1. public datasets only
13+
1. rate-limited to 100 requests per hour
14+
1. only two parameters may have multiple selections
15+
16+
For example, a query for three signals on one date across all counties can be
17+
submitted anonymously, but a query for three signals on a period of four weeks
18+
across all counties requires an API key.
19+
20+
An API key is a pseudonymous access token that grants privileged access to the
21+
Epidata API. You can request an API key by
22+
[registering with us](https://forms.gle/hkBr5SfQgxguAfEt7).
23+
Privileges of registration may include:
24+
25+
1. restricted-access datasets
26+
1. no rate limit
27+
1. no limit on multiple selections
28+
29+
We require an email address for all registrations so that we can contact you to
30+
resolve problems with excessive or abnormal usage patterns. Any additional
31+
personal information you provide to us at registration will be much appreciated,
32+
because it will help us understand what our data is used for and inform our
33+
plans and priorities, but is voluntary. For more information on how we use and
34+
store the information you provide us at registration time, see our
35+
[privacy statement](api/privacy_statement.md).
36+
37+
## Usage
38+
39+
If you choose to [register for an API key](https://forms.gle/hkBr5SfQgxguAfEt7),
40+
there are several ways to use your key to authenticate your requests:
41+
42+
### Via request parameter
43+
44+
The request parameter “api_key” can be used to pass the API key to the server.
45+
Example:
46+
47+
http://delphi.cmu.edu/epidata/covidcast/meta?api_key=your_api_key_here
48+
49+
### Via Basic Authentication
50+
51+
Another method is using the HTTP basic authorization header with the username
52+
"epidata" and the API key as the password. Example:
53+
54+
```
55+
curl -u 'epidata:your_api_key_here' https://delphi.cmu.edu/epidata/covidcast/meta
56+
```
57+
58+
### Via Bearer Token
59+
60+
Another method is providing the key in a bearer token header. Example:
61+
62+
```
63+
curl -H 'Authorization: Bearer your_api_key_here' https://delphi.cmu.edu/epidata/covidcast/meta
64+
```

docs/api/covidcast.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: COVIDcast Main Endpoint
33
has_children: true
4-
nav_order: 1
4+
nav_order: 2
55
---
66

77
# COVIDcast Epidata API

docs/api/privacy_statement.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Privacy Statement
3+
parent: API Keys
4+
---
5+
6+
# Delphi Privacy Statement
7+
8+
Anyone may access the Epidata API anonymously without providing any personal
9+
data.
10+
11+
Some features of the API are only available by registering for an API key. We
12+
require an email address for all registrations so that we can contact you to
13+
resolve problems with excessive or abnormal usage patterns. Any additional
14+
personal information you provide to us at registration will be much appreciated,
15+
because it will help us understand what our data is used for and inform our
16+
plans and priorities, but is voluntary.
17+
18+
You may also choose to share personal information with us to participate in user
19+
surveys.
20+
21+
We log information about API traffic including the query parameters, API key,
22+
and source IP address for each request. We retain these logs for a period of not
23+
longer than five years. We use this information for the following
24+
purposes:
25+
26+
* to monitor the responsiveness of the API service
27+
* to monitor the relative popularity of different data and features, alone and
28+
in concert with user survey results
29+
* to identify excessive or abnormal usage patterns which may harm our system
30+
31+
The logs are only available to members of our operations team, and are expunged
32+
at or before they reach five years in age.
33+
34+
If you provide us with your email address, we will only use it to contact you in
35+
the following scenarios:
36+
37+
* you asked a question in a user survey and we have an answer for you
38+
* we make improvements or other changes to the Epidata API service
39+
* the API service experiences an outage
40+
* your API key is about to expire
41+
* your API usage becomes excessive or abnormal
42+
* a voluntary survey of our users, but no more than once every 6 months
43+
44+
We store the mapping from tokens to email addresses in a location separate from
45+
server logs, using security measures consistent with our internal information
46+
security practices to help us keep your information secure. We only retrieve
47+
this mapping to resolve cases of excessive or abnormal usage. We automatically
48+
disassociate an email address from its API key when the API key has not been
49+
used for six months, or upon user request. You can request that your
50+
email address be removed from our records by filling out a
51+
[deletion request](https://forms.gle/GucFmZHTMgEFjH197).
52+
53+
For more information, see
54+
[Carnegie Mellon’s privacy notice](https://www.cmu.edu/legal/privacy-notice.html).
55+
Further questions can be directed to [email protected].

docs/epidata_development.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Epidata API Development Guide
3-
nav_order: 3
3+
nav_order: 4
44
---
55

66
# Epidata API Development Guide

docs/index.md

+19
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,25 @@ group](https://delphi.cmu.edu/). The Epidata API includes:
1414
quick access to COVID data are available.
1515
- [Data about other diseases](api/README.md), including influenza, dengue, and
1616
other diseases tracked by Delphi through various data streams.
17+
18+
Anyone may access the Epidata API anonymously without providing any personal
19+
data. Anonymous API access is currently rate-limited and restricted to public
20+
datasets with a maximum of two of the requested parameters having multiple
21+
selections (signals, dates, versions, regions, etc).
22+
23+
To request access to restricted datasets, no rate limit, and unlimited multiple
24+
selections, you can [request a registered API key](https://forms.gle/hkBr5SfQgxguAfEt7).
25+
26+
If you regularly or frequently use our system, please consider using an API key
27+
even if your usage falls within the anonymous usage limits. API key usage helps
28+
us understand who and how others are using our Delphi Epidata API, which may in
29+
turn inform our future research, data partnerships, and funding.
30+
31+
For more information about how we use the data you provide us through your
32+
registration and API request activity, see our
33+
[Privacy Statement](api/privacy_statement.md). At any time, you may submit a
34+
[Deletion Request](https://forms.gle/GucFmZHTMgEFjH197) to have us deactivate your key and destroy all
35+
information associating that key with your identity.
1736

1837
The Delphi group is extremely grateful to Pedrito Maynard-Zhang for all his
1938
help with the Epidata API [documentation](api/README.md).

docs/new_endpoint_tutorial.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: New Endpoint Tutorial
3-
nav_order: 4
3+
nav_order: 5
44
---
55

66
# Tutorial: Adding a new API endpoint

docs/symptom-survey/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: COVID-19 Trends and Impact Survey
33
has_children: true
4-
nav_order: 5
4+
nav_order: 6
55
---
66

77
# COVID-19 Trends and Impact Survey

0 commit comments

Comments
 (0)