Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Support query scopes in REST API #10893

Open
wants to merge 2 commits into
base: 5.x
Choose a base branch
from

Conversation

ryanmitchell
Copy link
Contributor

This PR adds support for using query scopes in the REST API.

The URL format follows the same approach as filters:

https://mysite.com/api/collections/pages/entries?query_scope[my_scope]=value

or, if you have multiple values

https://mysite.com/api/collections/pages/entries?query_scope[my_scope][value_key]=value&query_scope[my_scope][another_value_key]=value2

I've made a few changes to FilterAuthorizer to allow it to be easily extended by the new QueryScopeAuthorizer, seeing as they are basically doing the same thing with just a difference in the key being checked.

Closes #3310

@lokmanm
Copy link
Contributor

lokmanm commented Oct 3, 2024

Okay, now this gets interesting with Query Scopes in REST. Maybe we can finally ditch those custom controllers that do some custom filters 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Query Scope from Content API
2 participants