-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(messaging-stats): add documentation
- Loading branch information
Showing
3 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Messaging Stats | ||
**************** | ||
|
||
Provides a count of each unique messaging event grouped by either day, month or year. | ||
|
||
The endpoint accepts the following *required* query parameters: | ||
|
||
* *group_by* - field specifying whether to group events by day, month or year. | ||
|
||
* *target_type* - field to be used to determine the target object type i.e xform | ||
|
||
* *target_id* - field used to identify the target object. | ||
|
||
* *verb*: field used to filter returned responses by a specific verb | ||
|
||
* *timestamp*: used to filter by actions that occurred in a specific timeframe. This query parameter support date time lookups i.e `timestamp__day`, `timestamp__year | ||
|
||
Example | ||
^^^^^^^^ | ||
:: | ||
|
||
GET /api/v1/stats/messaging?target_id=1&target_type=xform&group_by=year | ||
|
||
Response | ||
^^^^^^^^^ | ||
:: | ||
|
||
[ | ||
{ | ||
"submission_edited": 5, | ||
"submission_created": 10, | ||
"group": "2023" | ||
}, | ||
{ | ||
"submission_edited": 1043, | ||
"submission_created": 5023, | ||
"submission_deleted": 200, | ||
"group": "2022" | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters