Repository navigation
feat: add admin.analytics.members.activity method - #2063
Draft
lukegalbraithrussell wants to merge 2 commits into
Draft
lukegalbraithrussell wants to merge 2 commits into
lukegalbraithrussell wants to merge 2 commits into
Conversation
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
3 of 16 tasks
lukegalbraithrussell
added a commit
that referenced
this pull request
Nov 18, 2026
The activity method is added separately in #2063, so this branch only adds admin.analytics.members.metadata. Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2063 +/- ##
==========================================
+ Coverage 84.60% 84.63% +0.02%
==========================================
Files 118 118
Lines 14067 14094 +27
==========================================
+ Hits 11901 11928 +27
Misses 2166 2166 ☔ View full report in Codecov by Harness. |
…ivity Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds the
admin.analytics.members.activitymethod to the Web API clients.admin_analytics_members_activityreturns activity metrics for each member of an organization or workspace for one day. All of its arguments are optional:date,team_id,member_types,user_ids,cursor, andlimit.member_typesanduser_idstake a string or a list, and a list is sent comma-separated.membertype ofadmin_analytics_getFile, and pairs withadmin.analytics.members.metadata, added in feat: add admin.analytics.members.metadata method #2064.scripts/codegen.py, and the method is added to the Web API coverage test.This pull request is independent of #2064, which adds
admin.analytics.members.metadata, so either one can be reviewed and merged first. Whichever merges second needs a rebase to update the endpoint count in the coverage test. Related to #2014.Testing
With an org-level user token that has the
admin.analytics:readscope, from a top-level admin or owner on an Enterprise+ org:client.admin_analytics_members_activity()and confirm the response hasdate,available_date_range,members, andtotal_count.dateset to a day inavailable_date_rangeanduser_idsset to a list of member IDs, and confirm only those members are returned.AsyncWebClientto check the generated async method.Live check: these calls ran against an Enterprise developer sandbox with an org-level user token that has
admin.analytics:read. With this branch'sWebClient, the call with no arguments returns the most recent day withavailable_date_range.datereturns the requested day.user_idsas a list and as a string each return only those members, andmember_typesworks as a list and as a string.limit=3withcursorpages through every member with no repeats and matchestotal_count.LegacyWebClientandAsyncWebClientreturnoktoo. The raw method also accepts both GET and POST, so the client's default POST works.Category
/docs(Documents)/tutorial(PythOnBoardingBot tutorial)tests/integration_tests(Automated tests for this library)Requirements
python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.shafter making the changes.🤖 Generated with Claude Code