diff --git a/docs/analytics/cloud.mdx b/docs/analytics/cloud.mdx index dc936ded0..3570ebf93 100644 --- a/docs/analytics/cloud.mdx +++ b/docs/analytics/cloud.mdx @@ -153,3 +153,16 @@ export 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="" # 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" +```