Skip to content

Commit 85f018d

Browse files
committed
Move hourly exports just before performance
1 parent ad42bfc commit 85f018d

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

_docs/50_api/20_export-data-points.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,6 @@ With this API you can export raw data points (without sampling). Data points are
1717
1818
When using the API, it's recommended [to generate the export URL](/api/helpers#generate-export-url) via [the export your data interface](/export-data). It has a simple UI where fields can be selected without any coding or technical knowledge.
1919

20-
## Hourly data export
21-
22-
You can now export data for specific hours of a day. This allows for more granular data analysis when you need to understand traffic patterns within a single day.
23-
24-
To export hourly data, append the hour to your date in the format `YYYY-MM-DDTHH` where `HH` is the hour in 24-hour format (00-23).
25-
26-
**Important constraints for hourly exports:**
27-
28-
- Both `start` and `end` parameters must include the hour
29-
- The start and end dates must be the same (you can only export hourly data for a single day at a time)
30-
- Hours must be between 00 and 23
31-
32-
**Example:**
33-
34-
```bash
35-
# Export data for 2PM on July 4th, 2025
36-
curl "https://simpleanalytics.com/api/export/datapoints?version={{ site.api_version }}&format=csv&hostname=example.com&start=2025-07-04T14&end=2025-07-04T14&fields=added_iso,path" \
37-
-H 'User-Id: sa_user_id_...' \
38-
-H 'Api-Key: sa_api_key_...'
39-
```
40-
4120
<details>
4221
<summary>Available fields in export</summary>
4322
<div markdown="1">
@@ -178,6 +157,27 @@ https://simpleanalytics.com/simpleanalytics.com.json?version={{ site.api_version
178157

179158
[See live example](https://simpleanalytics.com/simpleanalytics.com.json?version={{ site.api_version }}&start=yesterday&end=today&timezone=Europe/Amsterdam&events=visit_pricing) of output.
180159

160+
## Hourly data export
161+
162+
You can now export data for specific hours of a day. This allows for more granular data analysis when you need to understand traffic patterns within a single day.
163+
164+
To export hourly data, append the hour to your date in the format `YYYY-MM-DDTHH` where `HH` is the hour in 24-hour format (00-23).
165+
166+
**Important constraints for hourly exports:**
167+
168+
- Both `start` and `end` parameters must include the hour
169+
- The start and end dates must be the same (you can only export hourly data for a single day at a time)
170+
- Hours must be between 00 and 23
171+
172+
**Example:**
173+
174+
```bash
175+
# Export data for 2PM on July 4th, 2025
176+
curl "https://simpleanalytics.com/api/export/datapoints?version={{ site.api_version }}&format=csv&hostname=example.com&start=2025-07-04T14&end=2025-07-04T14&fields=added_iso,path" \
177+
-H 'User-Id: sa_user_id_...' \
178+
-H 'Api-Key: sa_api_key_...'
179+
```
180+
181181
## Performance
182182

183183
For us it does not matter how much data you export. We stream the data directly out of our database to your server or computer. No heavy load required.

0 commit comments

Comments
 (0)