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

How to get unpublished collection items? #34

Closed
adiba opened this issue Oct 19, 2022 · 3 comments
Closed

How to get unpublished collection items? #34

adiba opened this issue Oct 19, 2022 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@adiba
Copy link

adiba commented Oct 19, 2022

In the API playground below the response text field GET /content/items/{model}, the description "Get list of published model items" made me realize that this list is pre-filtered.

How can I get the entire unfiltered list, i.e., including unpublished items (i.e., items with _state=0)?

Even with filter={_state:0}, the result list didn't change (still only published items).

@adiba adiba changed the title Get unpublished collection items How to get unpublished collection items? Oct 31, 2022
@aheinze
Copy link
Collaborator

aheinze commented Oct 31, 2022

Hey 👋

You have to create a custom api endpoint to allow _state filtering.

@aheinze aheinze added the help wanted Extra attention is needed label Oct 31, 2022
@aheinze aheinze closed this as completed Nov 16, 2022
@Sonorpearl
Copy link

Sonorpearl commented Jan 18, 2023

How can I add a custom API endpoint for that?

@aheinze
Copy link
Collaborator

aheinze commented Jan 18, 2023

Have a look here https://github.com/witsec/cockpit-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants