Skip to content

feat: add admin.analytics.members.activity method - #2063

Draft
lukegalbraithrussell wants to merge 2 commits into
mainfrom
feat-admin-analytics-members-activity
Draft

lukegalbraithrussell wants to merge 2 commits into
mainfrom
feat-admin-analytics-members-activity

Conversation

@lukegalbraithrussell

@lukegalbraithrussell lukegalbraithrussell commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This pull request adds the admin.analytics.members.activity method to the Web API clients.

  • admin_analytics_members_activity returns 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, and limit. member_types and user_ids take a string or a list, and a list is sent comma-separated.
  • It's the JSON alternative to the member type of admin_analytics_getFile, and pairs with admin.analytics.members.metadata, added in feat: add admin.analytics.members.metadata method #2064.
  • The async and legacy clients are regenerated with 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:read scope, from a top-level admin or owner on an Enterprise+ org:

  1. Call client.admin_analytics_members_activity() and confirm the response has date, available_date_range, members, and total_count.
  2. Call it again with date set to a day in available_date_range and user_ids set to a list of member IDs, and confirm only those members are returned.
  3. Repeat with AsyncWebClient to 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's WebClient, the call with no arguments returns the most recent day with available_date_range. date returns the requested day. user_ids as a list and as a string each return only those members, and member_types works as a list and as a string. limit=3 with cursor pages through every member with no repeats and matches total_count. LegacyWebClient and AsyncWebClient return ok too. The raw method also accepts both GET and POST, so the client's default POST works.

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I have signed the Salesforce CLA (required before your PR can be reviewed or merged).
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

🤖 Generated with Claude Code

Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
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

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.63%. Comparing base (b041c02) to head (b5a630e).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

…ivity

Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant