Skip to content

Commit f6aaddc

Browse files
committed
Update docs
1 parent d833e0e commit f6aaddc

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

docs/api/api-reference/authentication.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,26 @@ title: Authentication
33
description: Here's how to authenticate your API requests.
44
---
55

6-
The Dune API uses API keys to authenticate requests. Your API key is used to determine the permissions of private queries you may call, as well as which account to bill for the requests, so be sure to keep them secure!
6+
The Dune API uses API keys to authenticate requests. Your API key is used to determine the permissions of private queries you may call, as well as which account to bill for the requests, so be sure to keep them secure!
77

88
**Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.**
99

10-
Authentication with the API is performed by adding an “x-dune-api-key” property to the request header. This is needed on all request types!
10+
## Header
11+
12+
Authentication with the API can be performed by adding an “x-dune-api-key” property to the request header.
1113

1214
Here's one example of doing this with an Execute POST API request:
1315

1416
```
1517
curl -X POST -H x-dune-api-key:{{api_key}} "https://api.dune.com/api/v1/query/{{query_id}}/execute"
16-
```
18+
```
19+
20+
## Query Parameter
21+
22+
Authentication with the API can also be performed by adding an `api_key` query paramater.
23+
24+
Here's one example of doing this with an Execute POST API request:
25+
26+
```
27+
curl -X POST "https://api.dune.com/api/v1/query/{{query_id}}/execute?api_key={{api_key}}"
28+
```

docs/api/api-reference/edit-queries/get-query.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Here's how to get or retrieve query info via Dune API
66
!!! abstract "ENDPOINTS"
77
GET /api/v1/query/{{query_id}}
88

9-
!!! success end "Note"
9+
!!! success end "Note"
1010
This endpoint is included only in our Premium subscription plans.
1111

1212
This endpoint will get details about a query (public, owned by the user, or a team the user belongs to), given the query ID. In the future we will likely also support getting a specific version, but for now, it returns data for the latest version.
@@ -17,7 +17,7 @@ User will be permissioned to get any public queries, private queries user owns,
1717

1818
### cURL
1919
```cURL
20-
curl -X GET "https://api.dune.com/api/v1/query/{{query_id}}/execute" \
20+
curl -X GET "https://api.dune.com/api/v1/query/{{query_id}}" \
2121
-H X-Dune-API-key: {{api_key}}
2222
```
2323

@@ -71,4 +71,4 @@ result_response = requests.request("GET", base_url, headers=headers)
7171

7272
## Error Codes
7373
- 400 - Invalid query ID passed in URL (e.g. not a number)
74-
- 404 - Query not found, or it’s private and belongs to somebody else
74+
- 404 - Query not found, or it’s private and belongs to somebody else

0 commit comments

Comments
 (0)