Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
5dddb9d
Document publicationFilter for REST, GraphQL, and Document Service API.
innerdvations Jun 18, 2026
1c3b082
Polish publicationFilter docs after review.
innerdvations Jun 18, 2026
3c6c7a5
merge: resolve main conflicts for publicationFilter documentation
innerdvations Jun 29, 2026
f77bb32
Convert REST publicationFilter examples to the redesigned Endpoint co…
pwizla Jun 30, 2026
87d3855
Split status × publicationFilter matrix into draft and published tables
innerdvations Jul 1, 2026
42f6d4d
Remove hasPublishedVersion from publicationFilter documentation
innerdvations Jul 1, 2026
57fa995
Trim publicationFilter docs for clarity
innerdvations Jul 1, 2026
e3cc083
Restructure Document Service publicationFilter page for readability
pwizla Jul 1, 2026
d45ad94
Restructure REST publicationFilter page for readability
pwizla Jul 1, 2026
c2c4147
Rename Scope column to Scope (i18n) in publicationFilter values tables
pwizla Jul 1, 2026
2958810
Add Key terms box defining row, cohort, and scope on Document Service…
pwizla Jul 1, 2026
afe92bb
Define row and pair terms in REST publicationFilter intro
pwizla Jul 1, 2026
8fbc5ca
Fix garbled publicationFilter question in Document Service intro
pwizla Jul 1, 2026
05842c8
Split Document Service publicationFilter page into explanation and re…
pwizla Jul 2, 2026
290ff71
Reduce cognitive load on REST publicationFilter page
pwizla Jul 2, 2026
4fbf7d0
Rework GraphQL publicationFilter section for first-time readers
pwizla Jul 2, 2026
5e3f4be
Replace cohort jargon with plain language across publicationFilter docs
pwizla Jul 2, 2026
b43e70c
Use bullet points on quick example description for readability
pwizla Jul 2, 2026
03f7b59
Format quick example (indentation) properly
pwizla Jul 2, 2026
6bcfc57
Add line break after quick example
pwizla Jul 2, 2026
55e886c
Implement parallel heading structure for H2s
pwizla Jul 2, 2026
6150caa
Deduplicate intro and model explanations on Document Service publicat…
pwizla Jul 2, 2026
d0daae1
Flatten Document Service publicationFilter page around a use-case table
pwizla Jul 2, 2026
3867edb
Add Available values table before use cases on publicationFilter page
pwizla Jul 2, 2026
d307f35
Trim Modified documents section to a single example
pwizla Jul 2, 2026
fbe3799
Align quick example response body indentation with other blocks
pwizla Jul 2, 2026
ae7f09e
Properly indent quick example again
pwizla Jul 2, 2026
8c437d9
Turn content manager mapping to a simple note
pwizla Jul 2, 2026
4a6536b
Indent request code bodies to 4 spaces in all Endpoint blocks
pwizla Jul 2, 2026
d4548a4
Add line break as a test for better table readability
pwizla Jul 2, 2026
35ee0eb
Put status and publicationFilter on separate lines in use-case table
pwizla Jul 2, 2026
df36784
Split use-case table into separate status and publicationFilter columns
pwizla Jul 2, 2026
facdf2c
Rename use-case columns to Use status with and Use publicationFilter …
pwizla Jul 2, 2026
a5f7521
Group use-case rows by status value
pwizla Jul 2, 2026
844940b
Use as instead of with in use-case column headers
pwizla Jul 2, 2026
6bf219b
Add examples for the three use cases that had none
pwizla Jul 2, 2026
6ba6172
Rewrite publicationFilter intro to lead with its purpose
pwizla Jul 2, 2026
59bc129
Update intro and move quick example
pwizla Jul 2, 2026
cf423e5
Repoint use-case table to the relocated never-published example
pwizla Jul 2, 2026
f7b6526
Fix never published intro
pwizla Jul 2, 2026
ab8d07d
Drop the redundant second sentence introducing the use-case table
pwizla Jul 2, 2026
37ad681
Show both status variants in the modified documents example
pwizla Jul 2, 2026
a4c98a8
Prefix example intros with publicationFilter: before the value
pwizla Jul 2, 2026
d9fd86d
Align example order with the use-case table order
pwizla Jul 3, 2026
2edbea3
Turn use-case goals into links and drop the redundant example column
pwizla Jul 3, 2026
0e0a690
Merge "modified" lines
pwizla Jul 3, 2026
704cbd7
Further refine table
pwizla Jul 3, 2026
9b7f858
Realign example sections with the edited use-case table
pwizla Jul 3, 2026
45df936
Simplify custom anchors
pwizla Jul 3, 2026
a087fcc
Fix use-case table links after anchor renames
pwizla Jul 3, 2026
4c5485c
Replace row(s) with version(s) + other formatting stuff
pwizla Jul 3, 2026
f7f8911
Simplify the never-published-document explanation into shorter sentences
pwizla Jul 3, 2026
4cfda68
Further formatting and clarification on modified docs
pwizla Jul 3, 2026
7734954
Parallelize unmodified example and add intros to published-without/wi…
pwizla Jul 3, 2026
1fb93c7
Show both status variants in the has-published-version example
pwizla Jul 3, 2026
6f4a046
Further refinements: descriptions, formatting, hierarchy
pwizla Jul 3, 2026
da89640
Fix terminology and parallelism issues from the review
pwizla Jul 3, 2026
e14784e
Align Available values table order with the use-case and example order
pwizla Jul 3, 2026
4953971
Apply suggestion from @pwizla
pwizla Jul 3, 2026
ecc9a45
Rewrite REST publicationFilter page to match the Document Service str…
pwizla Jul 3, 2026
5b1d1f7
Drop redundant REST codeTab from publicationFilter Endpoints
pwizla Jul 3, 2026
9721852
Restore missing Endpoint descriptions on REST publicationFilter page
pwizla Jul 3, 2026
ebbb7cd
Add cURL tab before JavaScript on REST publicationFilter Endpoints
pwizla Jul 3, 2026
a746245
Use real curl commands in REST publicationFilter cURL tabs
pwizla Jul 3, 2026
9c0a41b
Add a cURL tab to the REST status example
pwizla Jul 3, 2026
df4e9e6
Use proper indentation
pwizla Jul 3, 2026
3bf9d69
Apply proper code indentation to remaining REST publicationFilter exa…
pwizla Jul 3, 2026
d51aa16
Apply proper code indentation to the REST status example
pwizla Jul 3, 2026
9bd89b6
Show the full query string in REST publicationFilter Endpoint headers
pwizla Jul 3, 2026
17e4be8
Show the status query in the REST status Endpoint header
pwizla Jul 3, 2026
225da31
Show query strings in REST filters, sort-pagination, and populate-sel…
pwizla Jul 3, 2026
06814fa
Add publicationFilter to the List documents query parameters
pwizla Jul 3, 2026
9850f77
Apply UX audit fixes to Document Service publicationFilter page
pwizla Jul 3, 2026
f15b00a
Apply UX audit fixes to REST publicationFilter page
pwizla Jul 3, 2026
4290fdf
Explain the REST page mirrors the Document Service model at the end o…
pwizla Jul 3, 2026
3327977
Update LLMs files
pwizla Jul 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docusaurus/docs/cms/api/document-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Syntax: `findOne(parameters: Params) => Document`
{ name: 'documentId', type: 'ID', required: true, description: 'Document id' },
{ name: 'locale', type: 'String or undefined', required: false, description: 'Locale of the document to find. Defaults to the default locale. <a href="/cms/api/document-service/locale#find-one">See locale docs</a>.' },
{ name: 'status', type: "'published' | 'draft'", required: false, description: 'If <a href="/cms/features/draft-and-publish">Draft & Publish</a> is enabled: publication status. Can be <code>published</code> or <code>draft</code>. Default: <code>draft</code>. <a href="/cms/api/document-service/status#find-one">See status docs</a>.' },
{ name: 'publicationFilter', type: 'String', required: false, description: 'If <a href="/cms/features/draft-and-publish">Draft & Publish</a> is enabled: select documents by how their draft and published versions relate, before applying <code>status</code>. <a href="/cms/api/document-service/publication-filter">See publicationFilter docs</a>.' },
{ name: 'fields', type: 'Object', required: false, description: '<a href="/cms/api/document-service/fields#findone">Select fields</a> to return. Defaults to all fields (except those not populated by default).' },
{ name: 'populate', type: 'Object', required: false, description: '<a href="/cms/api/document-service/populate">Populate</a> results with additional fields. Default: <code>null</code>.' },
]}
Expand Down Expand Up @@ -147,6 +148,7 @@ Syntax: `findFirst(parameters: Params) => Document`
params={[
{ name: 'locale', type: 'String or undefined', required: false, description: 'Locale of the documents to find. Defaults to the default locale. <a href="/cms/api/document-service/locale#find-first">See locale docs</a>.' },
{ name: 'status', type: "'published' | 'draft'", required: false, description: 'If <a href="/cms/features/draft-and-publish">Draft & Publish</a> is enabled: publication status. Can be <code>published</code> or <code>draft</code>. Default: <code>draft</code>. <a href="/cms/api/document-service/status#find-first">See status docs</a>.' },
{ name: 'publicationFilter', type: 'String', required: false, description: 'If <a href="/cms/features/draft-and-publish">Draft & Publish</a> is enabled: select documents by how their draft and published versions relate, before applying <code>status</code>. <a href="/cms/api/document-service/publication-filter">See publicationFilter docs</a>.' },
{ name: 'filters', type: 'Object', required: false, description: '<a href="/cms/api/document-service/filters">Filters</a> to use. Default: <code>null</code>.' },
{ name: 'fields', type: 'Object', required: false, description: '<a href="/cms/api/document-service/fields#findfirst">Select fields</a> to return. Defaults to all fields (except those not populated by default).' },
{ name: 'populate', type: 'Object', required: false, description: '<a href="/cms/api/document-service/populate">Populate</a> results with additional fields. Default: <code>null</code>.' },
Expand Down Expand Up @@ -210,6 +212,7 @@ Syntax: `findMany(parameters: Params) => Document[]`
params={[
{ name: 'locale', type: 'String or undefined', required: false, description: 'Locale of the documents to find. Defaults to the default locale. <a href="/cms/api/document-service/locale#find-many">See locale docs</a>.' },
{ name: 'status', type: "'published' | 'draft'", required: false, description: 'If <a href="/cms/features/draft-and-publish">Draft & Publish</a> is enabled: publication status. Can be <code>published</code> or <code>draft</code>. Default: <code>draft</code>. <a href="/cms/api/document-service/status#find-many">See status docs</a>.' },
{ name: 'publicationFilter', type: 'String', required: false, description: 'If <a href="/cms/features/draft-and-publish">Draft & Publish</a> is enabled: select documents by how their draft and published versions relate, before applying <code>status</code>. <a href="/cms/api/document-service/publication-filter">See publicationFilter docs</a>.' },
{ name: 'filters', type: 'Object', required: false, description: '<a href="/cms/api/document-service/filters">Filters</a> to use. Default: <code>null</code>.' },
{ name: 'fields', type: 'Object', required: false, description: '<a href="/cms/api/document-service/fields#findmany">Select fields</a> to return. Defaults to all fields (except those not populated by default).' },
{ name: 'populate', type: 'Object', required: false, description: '<a href="/cms/api/document-service/populate">Populate</a> results with additional fields. Default: <code>null</code>.' },
Expand Down Expand Up @@ -606,6 +609,7 @@ Syntax: `count(parameters: Params) => number`
params={[
{ name: 'locale', type: 'String or null', required: false, description: 'Locale of the documents to count. Defaults to the default locale. <a href="/cms/api/document-service/locale#count">See locale docs</a>.' },
{ name: 'status', type: "'published' | 'draft'", required: false, description: 'If <a href="/cms/features/draft-and-publish">Draft & Publish</a> is enabled: publication status. <code>published</code> to count only published documents, <code>draft</code> to count draft documents (returns all documents). Default: <code>draft</code>. <a href="/cms/api/document-service/status#count">See status docs</a>.' },
{ name: 'publicationFilter', type: 'String', required: false, description: 'If <a href="/cms/features/draft-and-publish">Draft & Publish</a> is enabled: select documents by how their draft and published versions relate, before applying <code>status</code>. <a href="/cms/api/document-service/publication-filter">See publicationFilter docs</a>.' },
{ name: 'filters', type: 'Object', required: false, description: '<a href="/cms/api/document-service/filters">Filters</a> to use. Default: <code>null</code>.' },
]}
codeTabs={[
Expand Down Expand Up @@ -633,7 +637,7 @@ strapi.documents('api::restaurant.restaurant').count({ filters: { name: { $start
:::note
Since published documents necessarily also have a draft counterpart, a published document is still counted as having a draft version.

This means that counting with the `status: 'draft'` parameter still returns the total number of documents matching other parameters, even if some documents have already been published and are not displayed as "draft" or "modified" in the Content Manager anymore. There currently is no way to prevent already published documents from being counted.
This means that counting with the `status: 'draft'` parameter still returns the total number of documents matching other parameters, even if some documents have already been published and are not displayed as "draft" or "modified" in the Content Manager anymore. To count only never-published drafts, pass a [`publicationFilter`](/cms/api/document-service/publication-filter) value such as `'never-published'` or `'never-published-document'`.
:::

</Endpoint>
Loading
Loading