SkyeYoung commented on code in PR #12291: URL: https://github.com/apache/apisix/pull/12291#discussion_r2136842970
########## docs/en/latest/admin-api.md: ########## @@ -278,6 +278,42 @@ curl 'http://127.0.0.1:9180/apisix/admin/routes?name=test&uri=foo&label=' \ } ``` +### Support reference filtering query + +:::note + +This feature was introduced in APISIX 3.13.0. + +It now supports querying by `service_id` and `upstream_id` on routes and stream routes. Other resources or other fields are not supported. + +::: + +When getting a list of resources, it supports a `filter` for filtering resources by filters. + +It is encoded in the following manner. + +```text +filter=escape_uri(key1=value2&key2=value2) +``` + +The following example filters routes using `service_id`. Applying multiple filters simultaneously will return results that match all filter conditions. + +```shell +curl 'http://127.0.0.1:9180/apisix/admin/routes?filter=service_id%3D1' \ Review Comment: one question: can we adjust to use the format `a[b]=c&a[d]=e`? It seems more common. https://www.npmjs.com/package/qs -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
