{"id":16577676,"date":"2023-03-20T16:56:23","date_gmt":"2023-03-20T16:56:23","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/adding-query-parameters\/"},"modified":"2023-03-20T16:56:23","modified_gmt":"2023-03-20T16:56:23","slug":"adding-query-parameters","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/adding-query-parameters\/","title":{"rendered":"Adding Query Parameters"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I am looking to retrieve a subset of the records for a custom post type based on a value in an ACF field. The application is to allow our mobile app developer to call my site&#8217;s REST API for conference sessions, but only the ones with a flag set.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Functionally, I&#8217;d like to just add the query param and value to the end of the url, like this:<br \/>https:\/\/www.immunology2023.org\/wp-json\/wp\/v2\/session?app_share=1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve seen the WordPress documentation for doing this, but it includes the creation of a new REST endpoint, and I want to add this query param to an existing endpoint generated by the WP REST API Controller plugin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any advice? Code samples welcome!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-16577676","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16577676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16577676\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16577676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}