I added a custom workflow status to my Squidex app to differentiate between internally and externally published content items. For internally published content items I introduced a new status called “Published internally”, for externally published content items I am using the built-in “Published” status.
On a specific page in my application, I want to query content items that have either status “Published” or “Published internally”. Since Squidex by default only returns content items that are “Published” when querying the data using the API, I have to use the X-Unpublished
header to also return other statuses and add a custom filter to filter these statuses.
I’m submitting a…
- [ ] Regression (a behavior that stopped working in a new release)
- [ ] Bug report
- [ ] Performance issue
- [x ] Documentation issue or request
Current behavior
Currently, when setting the X-Unpublished
header, if a new “Draft” version is added of the same content item, the endpoint returns the data of that “Draft” version rather than the latest “Published” version (newStatus
equals Draft
).
Expected behavior
I am only interested in the “Published” or “Published internally” data, not in “Draft” data. How can I let the endpoint return only “Published” or “Published internally” data when a new “Draft” version is in the works?
Minimal reproduction of the problem
- Create a new schema item.
- Create a new custom workflow status “Published internally”.
- Create a new content item and set status to “Published internally” or “Published”.
- Create a new “Draft” version of the same content item.
- Query content items with
X-Unpublished
header and the following JSON filter:
{
"filter":{
"or": [
{
"path": "status",
"op": "eq",
"value": "Published"
},
{
"path": "status",
"op": "eq",
"value": "Published internally"
}
]
}
}
Environment
App Name: -
- [x] Self hosted with docker
- [ ] Self hosted with IIS
- [ ] Self hosted with other version
- [ ] Cloud version
Version: 7.3
Browser:
- N/A
Others: