Cockpit-HQ / Cockpit

Cockpit Core - Content Platform
https://getcockpit.com
Other
388 stars 48 forks source link

How to get unpublished collection items? #34

Closed adiba closed 2 years ago

adiba commented 2 years ago

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).

aheinze commented 2 years ago

Hey 👋

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

Sonorpearl commented 1 year ago

How can I add a custom API endpoint for that?

aheinze commented 1 year ago

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