-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PublicationAt breaking change (#2249)
* Fixing the table of links in the rest api documentation * String to specify the default behavior when creating a document * Updating the links in the sidebar, too * publishedAt breaking change * Update docusaurus/docs/dev-docs/api/rest.md * Update docusaurus/docs/dev-docs/api/rest.md * Rename file and add it to BC list --------- Co-authored-by: Pierre Wizla <[email protected]> Co-authored-by: Pierre Wizla <[email protected]>
- Loading branch information
1 parent
2782479
commit 2626bdc
Showing
3 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...saurus/docs/dev-docs/migration/v4-to-v5/breaking-changes/publishedat-removed.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
title: publishedAt can't be used anymore to define the status | ||
description: In Strapi 5, 'publishedAt' can no longer be used in Content API calls to set the status. The new status parameter can be used and accepts 2 different values, draft and published. | ||
sidebar_label: status instead of publishedAt | ||
displayed_sidebar: devDocsMigrationV5Sidebar | ||
tags: | ||
- breaking changes | ||
- Content API | ||
- GraphQL API | ||
- Document Service API | ||
- Draft & Publish | ||
- upgrade to Strapi 5 | ||
--- | ||
|
||
import Intro from '/docs/snippets/breaking-change-page-intro.md' | ||
import MigrationIntro from '/docs/snippets/breaking-change-page-migration-intro.md' | ||
import YesPlugins from '/docs/snippets/breaking-change-affecting-plugins.md' | ||
import YesCodemods from '/docs/snippets/breaking-change-handled-by-codemod.md' | ||
|
||
# `publishedAt` is removed and replaced by `status` | ||
|
||
In Strapi 5, the [Draft & Publish feature](/user-docs/content-manager/saving-and-publishing-content) has been reworked, and the Content API, including REST, GraphQL, and Document Service APIs accept a new `status` parameter. | ||
|
||
<Intro /> | ||
|
||
<YesPlugins /> | ||
<YesCodemods /> | ||
|
||
## Breaking change description | ||
|
||
<SideBySideContainer> | ||
|
||
<SideBySideColumn> | ||
|
||
**In Strapi v4** | ||
|
||
`publishedAt` is used in the request body and accepts the following values: | ||
|
||
- `null` sets an entry in draft, | ||
- A date string (e.g., `2021-10-28T16:57:26.352Z`) sets the entry to published status. | ||
|
||
</SideBySideColumn> | ||
|
||
<SideBySideColumn> | ||
|
||
**In Strapi 5** | ||
|
||
`status` is used as a query parameter and accepts the following values: | ||
|
||
- `draft` sets a in the draft version, | ||
- `published` sets a in the published version. | ||
|
||
</SideBySideColumn> | ||
|
||
</SideBySideContainer> | ||
|
||
## Migration | ||
|
||
<MigrationIntro /> | ||
|
||
### Notes | ||
|
||
* Additional information about how to use the new `status` parameter can be found in the [REST API](/dev-docs/api/rest/filters-locale-publication#status), [GraphQL API](/dev-docs/api/graphql#status), and [Document Service API](/dev-docs/api/document-service/status) documentation. | ||
|
||
### Migration procedure | ||
|
||
* API calls initiated from the front end (REST API, GraphQL API) that used `publishedAt` need to be manually updated. |