You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/upload-api.md
+22-7Lines changed: 22 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,17 +10,25 @@ The Dune CSV Upload API allows you to upload CSV files in the Dune database. Thi
10
10
11
11
Currently, the API only supports uploading CSV files with a maximum size of 200 MB. The API will return an error if the file size exceeds this limit.
12
12
13
+
For now, all files will be stored in the ``dunecat`` schema in the Dune database. In the future, we will allow users to specify the schema where the data should be stored. The table name must be specified in the request payload.
14
+
15
+
```sql
16
+
Select*fromdunecat.example_table
17
+
```
18
+
13
19
**All Data uploaded via this API is public and can be accessed by anyone.**
14
20
21
+
## How to use the API
15
22
23
+
Here are the key details you need to know to use the API.
16
24
17
-
## Authentication
25
+
###Authentication
18
26
19
27
To authenticate with the API, you must include your API key in the request headers. The header should look like this:
20
28
21
29
``X-Dune-Api-Key : <your-api-key>``
22
30
23
-
## Endpoint
31
+
###Endpoint
24
32
25
33
The API endpoint for uploading a CSV file is:
26
34
@@ -32,7 +40,6 @@ POST https://api.dune.com/api/v1/table/upload/csv
32
40
33
41
The request payload should be a JSON object containing the following fields:
34
42
35
-
-`namespace`: (string) The schema in the Dune database. This is static for now and should be set to ``dunecat``.
36
43
-`table_name`: (string) The target table in the database where the CSV data should be uploaded.
37
44
-`description`: (string, optional) A brief description of the uploaded data. Will be displayed in the Dune UI in the future.
38
45
-`data`: (string) The content of the CSV file, passed as a string.
@@ -41,7 +48,6 @@ The request payload should be a JSON object containing the following fields:
0 commit comments