Skip to content

Fix links in the REST API documentation #2247

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

Merged
merged 4 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 8 additions & 6 deletions docusaurus/docs/dev-docs/api/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ sources={{

| Method | URL | Description |
| -------- | ------------------------------- | ------------------------------------- |
| `GET` | `/api/:pluralApiId` | [Get a list of document](#get-documents) |
| `POST` | `/api/:pluralApiId` | [Create a document](#create-an-entry) |
| `GET` | `/api/:pluralApiId/:documentId` | [Get a document](#get-an-entry) |
| `PUT` | `/api/:pluralApiId/:documentId` | [Update a document](#update-an-entry) |
| `DELETE` | `/api/:pluralApiId/:documentId` | [Delete a document](#delete-an-entry) |
| `GET` | `/api/:pluralApiId` | [Get a list of document](#get-all) |
| `POST` | `/api/:pluralApiId` | [Create a document](#create) |
| `GET` | `/api/:pluralApiId/:documentId` | [Get a document](#get) |
| `PUT` | `/api/:pluralApiId/:documentId` | [Update a document](#update) |
| `DELETE` | `/api/:pluralApiId/:documentId` | [Delete a document](#delete) |

</TabItem>

Expand Down Expand Up @@ -300,7 +300,9 @@ In Strapi 5, a specific document is reached by its `documentId`.

Creates a document and returns its value.

If the [Internationalization (i18n) plugin](/dev-docs/i18n) is installed, it's possible to use POST requests to the REST API to [create localized documents](/dev-docs/i18n#creating-a-new-localized-entry).
By default, a document is created with a published status. To create a document as a draft, pass the [`?status=draft`](/dev-docs/api/rest/filters-locale-publication#status) query parameter.

If the Internationalization (i18n) feature is enabled on the content-type, it's possible to use POST requests to the REST API to [create localized documents](/dev-docs/i18n#creating-a-new-localized-entry).

:::note
While creating a document, you can define its relations and their order (see [Managing relations through the REST API](/dev-docs/api/rest/relations.md) for more details).
Expand Down
10 changes: 5 additions & 5 deletions docusaurus/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -978,27 +978,27 @@ const sidebars = {
{
type: 'link',
label: 'Get documents',
href: '/dev-docs/api/rest#get-documents'
href: '/dev-docs/api/rest#get-all'
},
{
type: 'link',
label: 'Get a document',
href: '/dev-docs/api/rest#get-a-document'
href: '/dev-docs/api/rest#get'
},
{
type: 'link',
label: 'Create a document',
href: '/dev-docs/api/rest#create-a-document'
href: '/dev-docs/api/rest#create'
},
{
type: 'link',
label: 'Update a document',
href: '/dev-docs/api/rest#update-a-document'
href: '/dev-docs/api/rest#update'
},
{
type: 'link',
label: 'Delete a document',
href: '/dev-docs/api/rest#delete-a-document'
href: '/dev-docs/api/rest#delete'
},
]
},
Expand Down