Repository navigation
feat(admin): align API contracts and expand coverage - #61
Merged
johnpmitsch merged 7 commits intoOct 29, 2026
Merged
johnpmitsch merged 7 commits into
johnpmitsch merged 7 commits into
Conversation
johnpmitsch
marked this pull request as ready for review
October 23, 2026 16:25
markwu35
approved these changes
Oct 29, 2026
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.
tl;dr
Fixes Admin endpoint reads that reject structured request filters or discard response fields. Adds 24 public Admin API operations across Rust, Python, Node.js, and Ruby for security controls, usage and metrics summaries, activity logs, and transactions.
Impact
_with_responsemethods expose useful mutation payloads while existing methods keep their return values.false.UpdateRateLimitsRequest.rate_limitsinSome(...), update affected full struct literals, and handle filter matchers as JSON values. TypeScript matcher arrays are nowunknown[]. All four language READMEs include usage and compatibility notes.Admin API changes
This PR adds support for 24 operations, improves 24 existing operations, and corrects documentation for 5. Only affected routes are listed below. Paths are relative to
/v0; slash-separated verbs share the same path.GET /endpoints/{id}/security/request_filtersGET/POST/PATCH /endpoints/{id}/security/client_certsDELETE /endpoints/{id}/security/client_certs/{fingerprint}GET/PUT /endpoints/{id}/security/method_blacklistGET/PUT /endpoints/{id}/security/range_limitsGET/POST /endpoints/{id}/security/blocked_ipsDELETE /endpoints/{id}/security/blocked_ips/{ip_id}GET /usage/credits/summaryGET /usage/rpc/summaryGET /usage/streams/summaryGET /usage/webhooks/summaryGET /metrics/traffic/summaryGET /metrics/errors/summaryGET /endpoints/{id}/metrics/errors/summaryGET /activity_logsGET /activity_logs/filtersGET /activity_logs/{id}GET /transactionsGET /transactions/{network}/{hash}POST /endpointsGET /endpoints/{id}GET /endpoints/{id}/securityPATCH /endpoints/{id}/security_optionsresponseLoggingupdates.POST /endpoints/{id}/security/request_filtersPUT /endpoints/{id}/security/request_filters/{request_filter_id}GET/POST /endpoints/{id}/method-rate-limitsPATCH /endpoints/{id}/method-rate-limits/{method_rate_limit_id}limit_by_ipin requests and responses, including explicitfalse.GET /endpoints/{id}/metricspercentilefor latency metrics.GET /usage/rpc/by-endpointGET /usage/rpc/by-methodGET /usage/rpc/by-chainGET /usage/rpc/by-tagPOST /endpoints/bulk/statusPOST/DELETE /endpoints/bulk/tagsPOST /endpoints/{id}/security/tokensPOST /endpoints/{id}/security/referrersPOST /endpoints/{id}/security/ipsPOST /endpoints/{id}/security/domain_masksPOST /endpoints/{id}/security/jwts_with_responsemethods that return created records and IDs. Existing methods keep their returns.POST /endpoints/{id}/tags_with_responsemethod for tag associations; clarify label requirements.PATCH /endpoints/{id}/rate-limits_with_responsefor effective RPS/RPM/RPD limits. Both methods acceptlimit_by_ip, including flag-only updates and explicitfalse.GET /endpointsPATCH /endpoints/{id}GET /tooling-accessGET /endpoints/{id}/logsPOST /teams/{id}/membersnpm examples for every added or affected method
These examples cover 62 methods: 33 new methods, changed request/response types, documentation-only updates, and the existing mutation counterparts. Each section uses the setup below. Calls are illustrative alternatives, not a single test workflow; mutation calls change the selected account or endpoint. Replace IDs and PEM placeholders with test-account values.
WithResponsecalls return the useful payload; the original mutation methods still returnvoid.Endpoint reads, updates, and security snapshots
Request filters
Client certificates, blocked methods, ranges, and IPs
Certificate operations can return
ApiErrorwith status 403 when mTLS is unavailable. Blacklist and range updates replace the complete configuration; empty collections clear it. Blocked IPs are enforced when IP security is enabled.Mutation responses and existing counterparts
The paired calls below are alternatives. Choose one form for each mutation. Do not log returned authentication tokens.
Method and endpoint rate limits
Endpoint metrics and legacy usage breakdowns
Usage and metrics summaries
For the first page, supply
lastor bothfromandto. Continue withcursoralone. Endpoint grouping values are integers or null; unselected dimensions are absent. Some count fields are nullable and metrics can be fractional.Bulk operations and item errors
Activity logs and transactions
Documentation-only clarifications
Where to focus your review
falsemust survive serialization.Decisions & tradeoffs
Technical notes
All 33 new methods and 89 new types have matching public exports and declarations. Python preserves response class names and setters; summary dimensions distinguish omission from explicit null. Ruby responses retain IndifferentHash behavior. Python and Node declarations are regenerated, Ruby RBS is updated, and all four Admin E2E examples reflect the supported APIs.
How I verified it
AI: built, tested, and self-reviewed with Codex using john-pipeline and jreview.
Ran:
cargo check,just lint, andcargo fmt --all -- --checkpassed.just testpassed: 286 core tests, including 134 Admin tests.just python-build,just node-build, andjust ruby-buildpassed, including Node package tests.8fea7b2.skipLibCheck. Method coverage matches the PR inventory. These examples were not executed against the live API.Not checked:
fromproperty, and unresolved webhook/SQL names in TypeScript declarations. The isolated Node example check supplies ambientprocesstyping and skips existing declaration errors.Confidence assessment: how likely is this to affect or break prod
Overall: medium upgrade risk, limited to callers of the Admin SDK. Rolling back the package version restores prior SDK behavior; it does not undo API mutations. No data migration is required.
unknown[]. Endpoint IDs and filters in the affected summary/transaction APIs change from strings to integers. Migration notes identify the required updates.Not verifiable from here: