Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/analytics/cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,16 @@ export GRANULARITY="<GRANULARITY>"
curl -X GET "https://analytics.sourcegraph.com/api/reports/by-user-client-date?instanceURL=$INSTANCE_URL&granularity=$GRANULARITY" \
-H "Authorization: Bearer $ACCESS_TOKEN"
```

Optional `startDate` and `endDate` values (formatted as `YYYY-MM-DD`) can be specified. Both parameters are optional. If neither is specified, the default is all time. If only one is specified, then only the start or end date filter will be applied.

Example:

```sh
export INSTANCE_URL="<INSTANCE_URL>" # e.g. example.sourcegraphcloud.com
export START_DATE="2025-01-01"
export END_DATE="2025-12-31"

curl -X GET "https://analytics.sourcegraph.com/api/reports/by-user-client-date?instanceURL=$INSTANCE_URL&startDate=$START_DATE&endDate=$END_DATE" \
-H "Authorization: Bearer $ACCESS_TOKEN"
```