Add cursor parameter to Audit Logs API method#1147
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1147 +/- ##
==========================================
- Coverage 86.62% 86.59% -0.04%
==========================================
Files 110 110
Lines 10755 10755
==========================================
- Hits 9317 9313 -4
- Misses 1438 1442 +4
Continue to review full report at Codecov.
|
srajiang
left a comment
There was a problem hiding this comment.
Reading more about cursor-pagination enabled methods. Would adding limit field also be appropriate to include along with these changes?
|
@srajiang "limit" argument is already supported! The reason why I missed "cursor" was that only "cursor" is not listed here: https://api.slack.com/admins/audit-logs#audit_logs_endpoints |
|
@seratch Of course! I needed to expand the code editor-view to see the other field 🤦♀️ - silly me. This looks good to me! |
Summary
The Audit Logs API's /logs endpoint supports pagination in requests. Although developers can use
additional_query_paramsas workaround now, we should have thecursorparameter in the method arguments.Category (place an
xin each of the[ ])/docs-src(Documents, have you run./scripts/docs.sh?)/docs-src-v2(Documents, have you run./scripts/docs-v2.sh?)/tutorial(PythOnBoardingBot tutorial)tests/integration_tests(Automated tests for this library)Requirements (place an
xin each[ ])python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.shafter making the changes.