Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
519e1b0
WIP rewriting REST guide
derrickmehaffy Dec 2, 2021
7e0d6b9
Fix example
derrickmehaffy Dec 2, 2021
9b9029a
Merge remote-tracking branch 'origin/main' into fixes/population
derrickmehaffy Dec 3, 2021
14ab982
rewrite filtering and init the other two
derrickmehaffy Dec 3, 2021
e1ce229
move to request/response instead
derrickmehaffy Dec 3, 2021
d880316
remove an example and fix typo
derrickmehaffy Dec 3, 2021
ce7b65d
remove another example based on community feedback
derrickmehaffy Dec 3, 2021
34a32c1
add missing $and and $or
derrickmehaffy Dec 3, 2021
10067e6
Merge branch 'main' into fixes/population
derrickmehaffy Dec 3, 2021
c44a92e
Merge remote-tracking branch 'origin/main' into fixes/population
derrickmehaffy Dec 3, 2021
9159d3d
99% finished with filtering
derrickmehaffy Dec 3, 2021
86b7068
wip population
derrickmehaffy Dec 3, 2021
d56c80b
Try adding some GitHub Actions to check links
derrickmehaffy Dec 6, 2021
75b5c60
fix syntax error in tests file
derrickmehaffy Dec 6, 2021
80c6245
Force working directory
derrickmehaffy Dec 6, 2021
94e4914
change to only pull request
derrickmehaffy Dec 6, 2021
36634b2
Fix publicationState and add field selection
derrickmehaffy Dec 6, 2021
8206e8d
Add relation population examples
derrickmehaffy Dec 6, 2021
f703108
Add component exmple
derrickmehaffy Dec 6, 2021
30845a8
basic dynamic zone example, need a more complex one too
derrickmehaffy Dec 6, 2021
d49a4d4
Finished rewriting REST docs
derrickmehaffy Dec 6, 2021
1aedaa8
Fix broken links
derrickmehaffy Dec 6, 2021
1ad0d3e
Merge branch 'main' into fixes/population
derrickmehaffy Dec 6, 2021
1a28265
Fix missing commas in examples
derrickmehaffy Dec 7, 2021
1e3f8a9
Fix all non-uniform uses of `// ...`
derrickmehaffy Dec 7, 2021
1876d23
fix example response syntax error
derrickmehaffy Dec 7, 2021
54b8397
Merge branch 'main' into fixes/population
derrickmehaffy Dec 7, 2021
133fea0
Fix extra data comments
derrickmehaffy Dec 7, 2021
1e93369
remove workflow from this PR
derrickmehaffy Dec 7, 2021
d498f50
Merge remote-tracking branch 'origin/main' into fixes/population
derrickmehaffy Dec 20, 2021
265a3f8
pr feedback 1
derrickmehaffy Dec 20, 2021
7cbeb73
Update docs/developer-docs/latest/developer-resources/database-apis-r…
derrickmehaffy Dec 20, 2021
e13944c
Apply suggestions from code review
derrickmehaffy Dec 20, 2021
a2bd77c
Update docs/developer-docs/latest/developer-resources/database-apis-r…
derrickmehaffy Dec 20, 2021
7049604
Update docs/developer-docs/latest/developer-resources/database-apis-r…
derrickmehaffy Dec 20, 2021
548244d
Update docs/developer-docs/latest/developer-resources/database-apis-r…
derrickmehaffy Dec 20, 2021
b06b189
Update docs/developer-docs/latest/developer-resources/database-apis-r…
derrickmehaffy Dec 20, 2021
0c75c7a
Update docs/developer-docs/latest/developer-resources/database-apis-r…
derrickmehaffy Dec 20, 2021
2fc87a7
Update docs/developer-docs/latest/developer-resources/database-apis-r…
derrickmehaffy Dec 20, 2021
16d6b20
Update docs/developer-docs/latest/developer-resources/database-apis-r…
derrickmehaffy Dec 20, 2021
940fc9a
tweak menu + other fixes
derrickmehaffy Dec 20, 2021
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
37 changes: 33 additions & 4 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,41 @@ const sidebar = {
{
title: 'APIs Reference',
collapsable: true,
initialOpenGroupIndex: -1,
sidebarDepth: 1,
children: [
[
'/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md',
'REST API',
],
{
title: 'REST API',
path: '/developer-docs/latest/developer-resources/database-apis-reference/rest-api.html',
collapsable: true,
initialOpenGroupIndex: -1,
// sidebarDepth: 3,
children: [
{
title: 'API Parameters',
collapsable: true,
initialOpenGroupIndex: -1,
children: [
[
'/developer-docs/latest/developer-resources/database-apis-reference/rest/filtering-locale-publication.md',
'Filtering, Locale, and Publication State'
],
[
'/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md',
'Population & Field Selection'
],
[
'/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.md',
'Sort & Pagination'
],
]
},
[
'/developer-docs/latest/developer-resources/database-apis-reference/rest-api.html',
'API Endpoints'
]
],
},
[
'/developer-docs/latest/developer-resources/database-apis-reference/graphql-api.md',
'GraphQL API',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ canonicalUrl: https://docs.strapi.io/developer-docs/latest/developer-resources/d

# Entity Service API

Strapi provides an Entity Service API, built on top of the [Query Engine API](/developer-docs/latest/developer-resources/database-apis-reference/query-engine-api.md). The Entity Service is the layer that handles Strapi's complex data structures like [components](/developer-docs/latest/development/backend-customization/models.md#components-2) and [dynamic zones](/developer-docs/latest/development/backend-customization/models.md#dynamic-zones), and uses the Query Engine API under the hood to execute database queries.
Strapi provides an Entity Service API, built on top of the [Query Engine API](/developer-docs/latest/developer-resources/database-apis-reference/query-engine-api.md). The Entity Service is the layer that handles Strapi's complex data structures like [components](/developer-docs/latest/development/backend-customization/models.md#components) and [dynamic zones](/developer-docs/latest/development/backend-customization/models.md#dynamic-zones), and uses the Query Engine API under the hood to execute database queries.

## Basic usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ canonicalUrl: https://docs.strapi.io/developer-docs/latest/developer-resources/d

# Entity Service API: Components and dynamic zones

The [Entity Service](/developer-docs/latest/developer-resources/database-apis-reference/entity-service-api.md) is the layer that handles [components](/developer-docs/latest/development/backend-customization/models.md#components-2) and [dynamic zones](/developer-docs/latest/development/backend-customization/models.md#dynamic-zones) logic. With the Entity Service API, components and dynamic zones can be [created](#creation) and [updated](#update) while creating or updating entries.
The [Entity Service](/developer-docs/latest/developer-resources/database-apis-reference/entity-service-api.md) is the layer that handles [components](/developer-docs/latest/development/backend-customization/models.md#components) and [dynamic zones](/developer-docs/latest/development/backend-customization/models.md#dynamic-zones) logic. With the Entity Service API, components and dynamic zones can be [created](#creation) and [updated](#update) while creating or updating entries.

## Creation

A [component](/developer-docs/latest/development/backend-customization/models.md#components-2) can be created while creating an entry with the Entity Service API:
A [component](/developer-docs/latest/development/backend-customization/models.md#components) can be created while creating an entry with the Entity Service API:

```js
strapi.entityService.create('api::article.article', {
Expand Down Expand Up @@ -43,7 +43,7 @@ strapi.entityService.create('api::article.article', {

## Update

A [component](/developer-docs/latest/development/backend-customization/models.md#components-2) can be updated while updating an entry with the Entity Service API. If a component `id` is specified, the component is updated, otherwise the old one is deleted and a new one is created:
A [component](/developer-docs/latest/development/backend-customization/models.md#components) can be updated while updating an entry with the Entity Service API. If a component `id` is specified, the component is updated, otherwise the old one is deleted and a new one is created:

```js
strapi.entityService.update('api::article.article', 1, {
Expand Down
Loading