docs(api): pass admin list parameters in a JSON body (15.9) - #570
Merged
Merged
Conversation
The admin list endpoints read their paging and filter parameters only from a JSON request body with snake_case keys. Parameters in the URL query string are ignored. Rewrite the curl examples that used the query string, fix the jq filters on job_status, and add a note to the Admin API overview.
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
The 15.9 Admin API pages had curl examples that passed list parameters in the URL query string, such as
?size=50&page=1,?errorCountMin=3,?sessionId=...and?q=Fess. Those endpoints read their parameters only from a JSON request body with snake_case keys, so the examples did nothing. Two of them misbehaved:GET /api/admin/searchlist/docs?q=Fesssearched every document.DELETE /api/admin/searchlist/query?q=...returned an error, becauseqwas empty.Changes
All seven locales,
15.9only:-X GET/-X DELETE,Content-Type: application/jsonand-d. The keys are snake_case, for example{"error_count_min": 3}and{"session_id": "..."}..job_statusinstead of.jobStatus, which the snake_case response no longer has.error_name.Verification
Each rewritten example was run against a 15.9 snapshot. For comparison:
role/settings,?size=2&page=2returned the first page; the same values in a body returned the second.failureurl/logs,{"error_count_min": 3}filtered the results;{"errorCountMin": 3}and?error_count_min=3did not.The
session_id,error_name,owner, searchlistqand joblog jq examples were also checked.tools/check_headings.pyreports nothing for 15.9.