Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,389 @@
---
title: Filtering for REST API - Strapi Developer Docs
description: Use Strapi's REST API to filter the results of your requests.
sidebarDepth: 3
canonicalUrl: https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest-api/filtering-locale-publication.html
---

# REST API: Filtering, Locale, and Publication State

The [REST API](/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md) offers the ability to filter results found with its ["Get entries"](/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md#get-entries) method.<br/>
Using optional Strapi features can provide some more filters:

- If the [Internationalization (i18n) plugin](/developer-docs/latest/plugins/i18n.md) is enabled on a content-type, it's possible to filter by locale.
- If the [Draft & Publish](/developer-docs/latest/concepts/draft-and-publish.md) is enabled, it's possible to filter based on a `live` or `draft` state.

## Filtering

Queries can accept a `filters` parameter with the following syntax:

`GET /api/:pluralApiId?filters[field][operator]=value`

The following operators are available:

| Operator | Description |
| --------------- | ---------------------------------------- |
| `$eq` | Equal |
| `$ne` | Not equal |
| `$lt` | Less than |
| `$lte` | Less than or equal to |
| `$gt` | Greater than |
| `$gte` | Greater than or equal to |
| `$in` | Included in an array |
| `$notIn` | Not included in an array |
| `$contains` | Contains (case-sensitive) |
| `$notContains` | Does not contain (case-sensitive) |
| `$containsi` | Contains |
| `$notContainsi` | Does not contain |
| `$null` | Is null |
| `$notNull` | Is not null |
| `$between` | Is between |
| `$startsWith` | Starts with |
| `$endsWith` | Ends with |
| `$or` | Joins the filters in an "or" expression |
| `$and` | Joins the filters in an "and" expression |

### Find users having 'John' as first name

::::api-call
:::request Example request

```js
const qs = require('qs');
const query = qs.stringify({
filters: {
username: {
$eq: 'John',
},
},
}, {
encodeValuesOnly: true,
});

await request(`/api/users?${query}`);
// GET /api/users?filters[username][$eq]=John
```

:::

:::response Example response

```json
[
{
"id": 1,
"username": "John",
"email": "john@test.com",
"provider": "local",
"confirmed": true,
"blocked": false,
"createdAt": "2021-12-03T20:08:17.740Z",
"updatedAt": "2021-12-03T20:08:17.740Z"
}
]
```

:::
::::

### Find multiple restaurants with ids 3, 6, 8

::::api-call
:::request Example request

```js
const qs = require('qs');
const query = qs.stringify({
filters: {
id: {
$in: [3, 6, 8],
},
},
}, {
encodeValuesOnly: true, // prettify url
});

await request(`/api/restaurants?${query}`);
// GET /api/restaurants?filters[id][$in][0]=3&filters[id][$in][1]=6&filters[id][$in][2]=8
```

:::

:::response Example response

```json
{
"data": [
{
"id": 3,
"attributes": {
"name": "test3",
// ...
}
},
{
"id": 6,
"attributes": {
"name": "test6",
// ...
}
},
{
"id": 8,
"attributes": {
"name": "test8",
// ...
}
}
],
"meta": {
// ...
}
}
```

:::
::::

:::caution
By default, the filters can only be used from `find` endpoints generated by the Content-Type Builder and the CLI.
:::

### Complex filtering

Complex filtering is combining multiple filters utilizing advanced methods such as combining `$and` & `$or`. This allows for more flexibility to request exactly the data needed.

::::api-call
:::request Example request: Find books with 2 possible dates & a specific author

```js
const qs = require('qs');
const query = qs.stringify({
filters: {
$or: [
{
date: {
$eq: '2020-01-01',
},
},
{
date: {
$eq: '2020-01-02',
},
},
],
author: {
name: {
$eq: 'Kai doe',
},
},
},
}, {
encodeValuesOnly: true,
});

await request(`/api/books?${query}`);
// GET /api/books?filters[$or][0][date][$eq]=2020-01-01&filters[$or][1][date][$eq]=2020-01-02&filters[author][name][$eq]=Kai%20doe
```

:::

:::response Example response

```json
{
"data": [
{
"id": 1,
"attributes": {
"name": "test1",
"date": "2020-01-01",
// ...
}
},
{
"id": 2,
"attributes": {
"name": "test2",
"date": "2020-01-02",
// ...
}
}
],
"meta": {
// ...
}
}
```

:::
::::

### Deep filtering

Deep filtering is filtering on a relation's fields.

::::api-call
:::request Example request: Find restaurants owned by a chef who belongs to a 5-star restaurant

```js
const qs = require('qs');
const query = qs.stringify({
filters: {
chef: {
restaurants: {
stars: {
$eq: 5,
},
},
},
},
}, {
encodeValuesOnly: true,
});

await request(`/api/restaurants?${query}`);
// GET /api/restaurants?filters[chef][restaurants][stars][$eq]=5
```

:::

:::response Example response

```json
{
"data": [
{
"id": 1,
"attributes": {
"name": "GORDON RAMSAY STEAK",
"stars": 5
// ...
}
},
{
"id": 2,
"attributes": {
"name": "GORDON RAMSAY BURGER",
"stars": 5
// ...
}
}
],
"meta": {
// ...
}
}
```

:::
::::

::: caution

- Querying your API with deep filters may cause performance issues. If one of your deep filtering queries is too slow, we recommend building a custom route with an optimized version of the query.
- Deep filtering isn't available for polymorphic relations (eg: Dynamic Zones & Media Fields).

:::

:::note

- Relations, media fields, components, and dynamic zones are not populated by default. Use the `populate` parameter to populate these data structures (see [population documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md#population))
- It is not possible to filter on dynamic zones or media fields

:::

## Locale

:::prerequisites

- The [Internationalization (i18n) plugin](/developer-docs/latest/plugins/i18n.md) should be installed.
- [Localization should be enabled for the content-type](/user-docs/latest/content-types-builder/creating-new-content-type.md#creating-a-new-content-type).
:::

The `locale` API parameter can be used to [get entries from a specific locale](/developer-docs/latest/plugins/i18n.md#getting-localized-entries-with-the-locale-parameter).

## Publication State

:::prerequisites
The [Draft & Publish](/developer-docs/latest/concepts/draft-and-publish.md) feature should be enabled.
:::

Queries can accept a `publicationState` parameter to fetch entries based on their publication state:

- `live`: returns only published entries (default)
- `preview`: returns both draft entries & published entries

::::api-call
:::request Example request: Get both published and draft articles

```js
const qs = require('qs');
const query = qs.stringify({
publicationState: 'preview',
}, {
encodeValuesOnly: true,
});

await request(`/api/articles?${query}`);
// GET /api/articles?publicationState=preview
```

:::
:::response Example response

```json
{
"data": [
{
"id": 1,
"attributes": {
"title": "This a Draft",
"publishedAt": null
// ...
}
},
{
"id": 2,
"attributes": {
"title": "This is Live",
"publishedAt": "2021-12-03T20:08:17.740Z"
// ...
}
}
],
"meta": {
// ...
}
}
```

:::
::::

::::tip
To retrieve only draft entries, combine the `preview` publication state and the `publishedAt` fields:

`GET /api/articles?publicationState=preview&filters[publishedAt][$null]=true`

:::details Example using qs

```js
const qs = require('qs');
const query = qs.stringify({
publicationState: 'preview',
filters: {
publishedAt: {
$null: true,
},
},
}, {
encodeValuesOnly: true,
});

await request(`/api/articles?${query}`);
// GET /api/articles?publicationState=preview&filters[publishedAt][$null]=true
```

:::
::::

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
---
title: Sort & Pagination for REST API - Strapi Developer Docs
description: Use Strapi's REST API to sort or paginate your data.
sidebarDepth: 3
canonicalUrl: https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.html
---

# REST API: Sort & Pagination

The [REST API](/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md) by default does not populate any relations, media fields, components, or dynamic zones. It will return all fields for the model and while populating.

## Sorting

Queries can accept a `sort` parameter that allow sorting on one or multiple fields with the following syntax:

### Sort using 2 fields

::::api-call
:::request Example request

```js
const qs = require('qs');
const query = qs.stringify({
sort: ['title', 'slug'],
}, {
encodeValuesOnly: true,
});

await request(`/api/articles?${query}`);
// GET /api/articles?sort[0]=title&sort[1]=slug
```

:::

:::response Example response

```json
{
"data": [
{
"id": 1,
"attributes": {
"title": "Test Article",
"slug": "test-article",
// ...
}
},
{
"id": 2,
"attributes": {
"title": "Test Article",
"slug": "test-article-1",
// ...
}
}
],
"meta": {
// ...
}
}
```

:::
::::

### Sort using 2 fields and set the order

The sorting order can be defined with `:asc` (ascending order, default, can be omitted) or `:desc` (for descending order).

::::api-call
:::request Example request

```js
const qs = require('qs');
const query = qs.stringify({
sort: ['title:asc', 'slug:desc'],
}, {
encodeValuesOnly: true,
});

await request(`/api/articles?${query}`);
// GET /api/articles?sort[0]=title%3Aasc&sort[1]=slug%3Adesc
```

:::

:::response Example response

```json
{
"data": [
{
"id": 2,
"attributes": {
"title": "Test Article",
"slug": "test-article-1",
// ...
}
},
{
"id": 1,
"attributes": {
"title": "Test Article",
"slug": "test-article",
// ...
}
}
],
"meta": {
// ...
}
}
```

:::
::::

## Pagination

Queries can accept `pagination` parameters. Results can be paginated:

- either by page (i.e. specifying a page number and the number of entries per page)
- or by offset (i.e. specifying how many entries to skip and to return)

:::note
Pagination methods can not be mixed. Always use either `page` with `pageSize` **or** `start` with `limit`.
:::

### Pagination by page

To paginate results by page, use the following parameters:

| Parameter | Type | Description | Default |
| ----------------------- | ------- | ------------------------------------------------------------------------- | ------- |
| `pagination[page]` | Integer | Page number | 1 |
| `pagination[pageSize]` | Integer | Page size | 25 |
| `pagination[withCount]` | Boolean | Adds the total numbers of entries and the number of pages to the response | True |

:::: api-call
::: request Example request: Select only 10 entries on page 1

```js
const qs = require('qs');
const query = qs.stringify({
pagination: {
page: 1,
pageSize: 10,
},
}, {
encodeValuesOnly: true,
});

await request(`/api/articles?${query}`);
// GET /api/articles?pagination[page]=1&pagination[pageSize]=10
```

:::
::: response Example response

```json
{
"data": [
// ...
],
"meta": {
"pagination": {
"page": 1,
"pageSize": 10,
"pageCount": 5,
"total": 48
}
}
}
```

:::
::::

### Pagination by offset

To paginate results by offset, use the following parameters:

| Parameter | Type | Description | Default |
| ----------------------- | ------- | -------------------------------------------------------------- | ------- |
| `pagination[start]` | Integer | Start value (i.e. first entry to return) | 0 |
| `pagination[limit]` | Integer | Number of entries to return | 25 |
| `pagination[withCount]` | Boolean | Toggles displaying the total number of entries to the response | `true` |

::: tip
The default and maximum values for `pagination[limit]` can be [configured in the `./config/api.js`](/developer-docs/latest/setup-deployment-guides/configurations/optional/api.md) file with the `api.rest.defaultLimit` and `api.rest.maxLimit` keys.
:::

:::: api-call
::: request Example request

```js
const qs = require('qs');
const query = qs.stringify({
pagination: {
start: 0,
limit: 10,
},
}, {
encodeValuesOnly: true,
});

await request(`/api/articles?${query}`);
// GET /api/articles?pagination[start]=0&pagination[limit]=10
```

:::
::: response Example response

```json
{
"data": [
// ...
],
"meta": {
"pagination": {
"start": 0,
"limit": 10,
"total": 42
}
}
}
```

:::
::::
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Within the bootstrap function, a plugin can:
```js
module.exports = () => {
return {
//...
// ...
bootstrap(app) {
// execute some bootstrap code
app
Expand Down Expand Up @@ -531,19 +531,18 @@ Reducers are [Redux](https://redux.js.org/) reducers that can be used to share s
* The application state is updated frequently.
* The logic to update that state may be complex.
A reducer is declared as an object with this syntax:
`['pluginId_reducerName']: function() {}`
Reducers can be added to a plugin interface with the `addReducers()` function during the [`register`](#register) lifecycle.
A reducer is declared as an object with this syntax:
**Example:**
```js
// path: my-plugin/admin/src/index.js
import { exampleReducer } from './reducers'

const reducers = {
// Reducer Syntax
[`${pluginId}_exampleReducer`]: exampleReducer
}

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/latest/plugins/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ When the i18n plugin is installed, the response to requests can include fields t

- The `locale` (string) field is always included, it's the locale code for the content entry.

- The `localizations` (object) can be included if specifically requested by appending `?populate=localizations` to the URL (see [relations population documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md#relations-population). It includes a `data` array with a list of objects, each of them including the `id` and `attributes` of the localization.
- The `localizations` (object) can be included if specifically requested by appending `?populate=localizations` to the URL (see [relations population documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md#population). It includes a `data` array with a list of objects, each of them including the `id` and `attributes` of the localization.

:::: api-call

Expand Down
20 changes: 10 additions & 10 deletions docs/developer-docs/latest/plugins/upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can pass configuration to the middleware directly by setting it in the `body
// path: ./config/middlewares.js

module.exports = {
//...
// ...
{
name: "strapi::body",
config: {
Expand All @@ -32,7 +32,7 @@ module.exports = {
},
},
},
//...
// ...
};
```

Expand Down Expand Up @@ -162,7 +162,7 @@ The `Restaurant` model attributes:
// path: ./src/api/restaurant/content-types/restaurant/schema.json

{
//..
// ...
"attributes": {
"name": {
"type": "string"
Expand All @@ -172,7 +172,7 @@ The `Restaurant` model attributes:
"multiple": false,
}
}
//..
// ...
}
```

Expand Down Expand Up @@ -219,7 +219,7 @@ The `Restaurant` model attributes:
// path: ./src/api/restaurant/content-types/restaurant/schema.json

{
//..
// ...
"attributes": {
"name": {
"type": "string"
Expand All @@ -229,7 +229,7 @@ The `Restaurant` model attributes:
"multiple": false,
}
}
//..
// ...
}

```
Expand Down Expand Up @@ -303,7 +303,7 @@ In the first example below, you will be able to upload and attach one file to th
// path: ./src/api/restaurant/content-types/restaurant/schema.json

{
//..
// ...
{
"attributes": {
"pseudo": {
Expand All @@ -321,7 +321,7 @@ In the first example below, you will be able to upload and attach one file to th
}
}
}
//..
// ...
}

```
Expand All @@ -332,7 +332,7 @@ In our second example, you can upload and attach multiple pictures to the restau
// path: ./src/api/restaurant/content-types/restaurant/schema.json

{
//..
// ...
{
"attributes": {
"name": {
Expand All @@ -345,7 +345,7 @@ In our second example, you can upload and attach multiple pictures to the restau
}
}
}
//..
// ...
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ General settings for API calls can be set in the `./config/api.js` file:
| `responses` | Global API response configuration | Object | - |
| `responses.privateAttributes` | Set of globally defined attributes to be treated as private. | String array | `[]` |
| `rest` | REST API configuration | Object | - |
| `rest.defaultLimit` | Default `limit` parameter used in API calls (see [REST API documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md#pagination-by-offset)) | Integer | `25` |
| `rest.maxLimit` | Maximum allowed number that can be requested as `limit` (see [REST API documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md#pagination-by-offset)).<br/><br/>Defaults to `null`, which fetches all results. | Integer | `100` |
| `rest.defaultLimit` | Default `limit` parameter used in API calls (see [REST API documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.md#pagination-by-offset)) | Integer | `25` |
| `rest.maxLimit` | Maximum allowed number that can be requested as `limit` (see [REST API documentation](/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.md#pagination-by-offset)).<br/><br/>Defaults to `null`, which fetches all results. | Integer | `100` |

**Example:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If you have extended the model in any way, you will need to add the new attribut
```json
{
"attributes": {
//...
// ...
}
}
```
Expand All @@ -42,7 +42,7 @@ If you have extended the model in any way, you will need to add the new attribut
```json
{
"attributes": {
//...
// ...
"confirmationToken": {
"type": "string",
"configurable": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ You must upgrade the versions and add `strapi-admin` as a dependency.
```json
{
"dependencies": {
//...
// ...
"strapi": "3.0.0-alpha.26.2",
"strapi-hook-bookshelf": "3.0.0-alpha.26.2",
"strapi-hook-knex": "3.0.0-alpha.26.2",
Expand All @@ -67,7 +67,7 @@ You must upgrade the versions and add `strapi-admin` as a dependency.
```json
{
"dependencies": {
//...
// ...
"strapi": "3.0.0-beta.x",
"strapi-admin": "3.0.0-beta.x",
"strapi-hook-bookshelf": "3.0.0-beta.x",
Expand All @@ -84,7 +84,7 @@ Here are the default ones. If you have installed other plugins you will also nee
```json
{
"dependencies": {
//...
// ...
"strapi-plugin-content-manager": "3.0.0-beta.x",
"strapi-plugin-content-type-builder": "3.0.0-beta.x",
"strapi-plugin-email": "3.0.0-beta.x",
Expand All @@ -107,7 +107,7 @@ We have completely refreshed the `scripts` of a project, so update them as follo
"start": "node server.js",
"strapi": "node_modules/strapi/bin/strapi.js",
"postinstall": "node node_modules/strapi/lib/utils/post-install.js"
//...
// ...
}
}
```
Expand All @@ -121,7 +121,7 @@ We have completely refreshed the `scripts` of a project, so update them as follo
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
//...
// ...
}
}
```
Expand All @@ -141,7 +141,7 @@ We removed the need for the `packageManager` key under `strapi`.
```json
{
"strapi": {
//...
// ...
"packageManager": "yarn"
}
}
Expand All @@ -152,7 +152,7 @@ We removed the need for the `packageManager` key under `strapi`.
```json
{
"strapi": {
//...
// ...
}
}
```
Expand Down Expand Up @@ -331,7 +331,7 @@ All the unchanged routes must be removed from this file.
}
}
}
//...
// ...
]
}
```
Expand Down Expand Up @@ -370,14 +370,14 @@ module.exports = {
customIndex: async ctx => {},

find: async (ctx, next, { populate } = {}) => {
//...
// ...
},

me: async ctx => {
//...
// ...
},

//...
// ...
};
```

Expand Down Expand Up @@ -622,7 +622,7 @@ If you haven't customized the `destroy` action, then remove it from your control
```json
{
"routes": [
//...
// ...
{
"method": "DELETE",
"path": "/products/:id",
Expand Down Expand Up @@ -672,7 +672,7 @@ module.exports = {
```json
{
"routes": [
//...
// ...
{
"method": "DELETE",
"path": "/products/:id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Your package.json would look like this:

```json
{
//...
// ...
"dependencies": {
"strapi": "3.0.0-beta.16",
"strapi-admin": "3.0.0-beta.16",
Expand Down Expand Up @@ -66,7 +66,7 @@ To make sure a Wysiwyg field stays the same when deploying, we introduced the `r

```json
{
//...
// ...
"attributes": {
"name": {
"type": "string"
Expand All @@ -82,7 +82,7 @@ To make sure a Wysiwyg field stays the same when deploying, we introduced the `r

```json
{
//...
// ...
"attributes": {
"name": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Your package.json should look like this:

```json
{
//...
// ...
"dependencies": {
"strapi": "3.0.0-beta.17.4",
"strapi-admin": "3.0.0-beta.17.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Update your package.json accordingly:

```json
{
//...
// ...
"dependencies": {
"strapi": "3.0.0-beta.17.4",
"strapi-admin": "3.0.0-beta.17.4",
Expand All @@ -54,7 +54,7 @@ Update your package.json accordingly:

```json
{
//...
// ...
"dependencies": {
"strapi": "3.0.0-beta.18.3",
"strapi-admin": "3.0.0-beta.18.3",
Expand All @@ -78,7 +78,7 @@ Update your package.json accordingly:

```json
{
//...
// ...
"dependencies": {
"strapi": "3.0.0-beta.17.4",
"strapi-admin": "3.0.0-beta.17.4",
Expand All @@ -98,7 +98,7 @@ Update your package.json accordingly:

```json
{
//...
// ...
"dependencies": {
"strapi": "3.0.0-beta.18.3",
"strapi-admin": "3.0.0-beta.18.3",
Expand Down Expand Up @@ -139,7 +139,7 @@ You can now only use the connector name instead of the complete package name.
"default": {
"connector": "strapi-hook-bookshelf",
"settings": {
//...
// ...
},
"options": {}
}
Expand All @@ -156,10 +156,10 @@ You can now only use the connector name instead of the complete package name.
"default": {
"connector": "bookshelf",
"settings": {
//...
// ...
},
"options": {
//...
// ...
}
}
}
Expand All @@ -179,7 +179,7 @@ You can now only use the connector name instead of the complete package name.
"default": {
"connector": "strapi-hook-mongoose",
"settings": {
//...
// ...
},
"options": {}
}
Expand All @@ -196,10 +196,10 @@ You can now only use the connector name instead of the complete package name.
"default": {
"connector": "mongoose",
"settings": {
//...
// ...
},
"options": {
//...
// ...
}
}
}
Expand Down Expand Up @@ -233,7 +233,7 @@ The admin panel contains certain assets that use `data:img;base64` images. To al
"block-all-mixed-content"
]
}
//....
// ...
}
```

Expand All @@ -245,7 +245,7 @@ The admin panel contains certain assets that use `data:img;base64` images. To al
"enabled": true,
"policy": ["block-all-mixed-content"]
}
//....
// ...
}
```

Expand Down Expand Up @@ -507,7 +507,7 @@ RENAME TABLE groups_old_table_name TO components_new_table_name;
```json
{
"collectionName": "groups_old_table_name"
//...
// ...
}
```

Expand All @@ -517,7 +517,7 @@ RENAME TABLE groups_old_table_name TO components_new_table_name;
```json
{
"collectionName": "components_new_table_name"
//....
// ...
}
```

Expand Down Expand Up @@ -576,7 +576,7 @@ db.collection.renameCollection('groups_my_group', 'components_my_component');
```json
{
"collectionName": "groups_old_table_name"
//...
// ...
}
```

Expand All @@ -586,7 +586,7 @@ db.collection.renameCollection('groups_my_group', 'components_my_component');
```json
{
"collectionName": "components_new_table_name"
//....
// ...
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Update your package.json accordingly:

```json
{
//...
// ...
"dependencies": {
"strapi": "3.0.0-beta.19",
"strapi-admin": "3.0.0-beta.19",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Update your package.json accordingly:

```json
{
//...
// ...
"dependencies": {
"strapi": "3.0.0-beta.19.4",
"strapi-admin": "3.0.0-beta.19.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ This option tells strapi where it is hosted and is useful for generating links o

```js
module.exports = {
//...
// ...
url: `https://domain.com:1337`,
};
```
Expand All @@ -299,7 +299,7 @@ What you can now do is add a path to the url to host strapi in a sub path of you

```js
module.exports = {
//...
// ...
url: `https://domain.com:1337/my-strapi-api`,
};
```
Expand Down Expand Up @@ -334,7 +334,7 @@ The `url` option can either be a relative path: `/admin-panel` or an absolute ur

```js
module.exports = {
//...
// ...
admin: {
url: '/dashboard',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ For example upgrading from `4.0.0` to `4.0.1`:

```json
{
//...
// ...
"dependencies": {
"@strapi/plugin-documentation": "4.0.0",
"@strapi/plugin-i18n": "4.0.0",
"@strapi/plugin-users-permissions": "4.0.0",
"@strapi/strapi": "4.0.0"
//...
// ...
}
}
```
Expand All @@ -49,13 +49,13 @@ For example upgrading from `4.0.0` to `4.0.1`:

```json
{
//...
// ...
"dependencies": {
"@strapi/plugin-documentation": "4.0.1",
"@strapi/plugin-i18n": "4.0.1",
"@strapi/plugin-users-permissions": "4.0.1",
"@strapi/strapi": "4.0.1"
//...
// ...
}
}
```
Expand Down
30 changes: 21 additions & 9 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "developer-docs",
"version": "3.0.0",
"name": "strapi-docs",
"version": "4.0.0",
"main": "index.js",
"scripts": {
"dev": "vuepress dev",
"build": "vuepress build",
"check-links": "vuepress check-md"
"check-links": "vuepress check-md",
"lint": ""
},
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@vuepress/plugin-medium-zoom": "^1.8.2",
"markdown-it-include": "^2.0.0",
Expand All @@ -22,16 +22,28 @@
"vuepress-plugin-check-md": "^0.0.2",
"vuepress-plugin-container": "^2.1.5"
},
"bugs": {
"url": "https://github.com/strapi/documentation/issues"
},
"repository": {
"type": "git",
"url": "git://github.com/strapi/documentation.git"
},
"author": {
"name": "Strapi Solutions SAS",
"email": "hi@strapi.io",
"name": "Strapi Solutions",
"url": "http://strapi.io"
"url": "https://strapi.io"
},
"maintainers": [
{
"name": "Strapi Solutions",
"name": "Strapi Solutions SAS",
"email": "hi@strapi.io",
"url": "http://strapi.io"
"url": "https://strapi.io"
}
]
],
"license": "MIT",
"engines": {
"node": ">=12.x.x <=16.x.x",
"npm": ">=6.0.0"
}
}