Skip to content

Commit

Permalink
Switch back to 1-column layout in API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pwizla committed Oct 9, 2024
1 parent 6a9a0ec commit 3572bf9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 123 deletions.
57 changes: 0 additions & 57 deletions docusaurus/docs/dev-docs/api/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,6 @@ Requests return a response as an object which usually includes the following key
Some plugins (including Users & Permissions and Upload) may not follow this response format.
:::

<SideBySideContainer>

<SideBySideColumn>

### Get documents {#get-all}

Returns documents matching the query filters (see [API parameters](/dev-docs/api/rest/parameters) documentation).
Expand All @@ -164,10 +160,6 @@ In Strapi 5 the response format has been flattened, and attributes are directly
You can pass an optional header while you're migrating to Strapi 5 (see the [related breaking change](/dev-docs/migration/v4-to-v5/breaking-changes/new-response-format)).
:::

</SideBySideColumn>

<SideBySideColumn>

<ApiCall>

<Request>
Expand Down Expand Up @@ -227,14 +219,6 @@ You can pass an optional header while you're migrating to Strapi 5 (see the [rel

</ApiCall>

</SideBySideColumn>

</SideBySideContainer>

<SideBySideContainer>

<SideBySideColumn>

### Get a document {#get}

Returns a document by `documentId`.
Expand All @@ -243,10 +227,6 @@ Returns a document by `documentId`.
In Strapi 5, a specific document is reached by its `documentId`.
:::

</SideBySideColumn>

<SideBySideColumn>

<ApiCall>

<Request title="Example request">
Expand Down Expand Up @@ -288,14 +268,6 @@ In Strapi 5, a specific document is reached by its `documentId`.

</ApiCall>

</SideBySideColumn>

</SideBySideContainer>

<SideBySideContainer>

<SideBySideColumn>

### Create a document {#create}

Creates a document and returns its value.
Expand All @@ -308,10 +280,6 @@ If the Internationalization (i18n) feature is enabled on the content-type, it's
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).
:::

</SideBySideColumn>

<SideBySideColumn>

<ApiCall>

<Request title="Example request">
Expand Down Expand Up @@ -370,14 +338,6 @@ While creating a document, you can define its relations and their order (see [Ma

</ApiCall>

</SideBySideColumn>
</SideBySideContainer>


<SideBySideContainer>

<SideBySideColumn>

### Update a document {#update}

Partially updates a document by `id` and returns its value.
Expand All @@ -390,10 +350,6 @@ Send a `null` value to clear fields.
* While updating a document, you can define its relations and their order (see [Managing relations through the REST API](/dev-docs/api/rest/relations) for more details).
:::

</SideBySideColumn>

<SideBySideColumn>

<ApiCall>

<Request title="Example request">
Expand Down Expand Up @@ -453,22 +409,12 @@ Send a `null` value to clear fields.

</ApiCall>

</SideBySideColumn>
</SideBySideContainer >

<SideBySideContainer>

<SideBySideColumn>

### Delete a document {#delete}

Deletes a document.

`DELETE` requests only send a 204 HTTP status code on success and do not return any data in the response body.

</SideBySideColumn>

<SideBySideColumn>
<ApiCall>

<Request title="Example request">
Expand All @@ -478,6 +424,3 @@ Deletes a document.
</Request>

</ApiCall>

</SideBySideColumn>
</SideBySideContainer>
48 changes: 0 additions & 48 deletions docusaurus/docs/dev-docs/api/rest/filters-locale-publication.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,11 @@ The following operators are available:
By default, the filters can only be used from `find` endpoints generated by the Content-type Builder and the CLI.
:::

<SideBySideContainer>
<SideBySideColumn>

### Example: Find users having 'John' as a first name

You can use the `$eq` filter operator to find an exact match.

</SideBySideColumn>

<SideBySideColumn>

<br />

<ApiCall>
Expand Down Expand Up @@ -144,20 +138,10 @@ await request(`/api/users?${query}`);

</details>

</SideBySideColumn>
</SideBySideContainer>

<SideBySideContainer>
<SideBySideColumn>

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

You can use the `$in` filter operator with an array of values to find multiple exact values.

</SideBySideColumn>

<SideBySideColumn>

<br />

<ApiCall>
Expand Down Expand Up @@ -216,20 +200,10 @@ await request(`/api/restaurants?${query}`);

</details>

</SideBySideColumn>
</SideBySideContainer>

<SideBySideContainer>
<SideBySideColumn>

### Complex filtering

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

</SideBySideColumn>

<SideBySideColumn>

<br />
<ApiCall>
<Request title="Find books with 2 possible dates and a specific author">
Expand Down Expand Up @@ -303,12 +277,6 @@ await request(`/api/books?${query}`);

</details>

</SideBySideColumn>
</SideBySideContainer>

<SideBySideContainer>
<SideBySideColumn>

### Deep filtering

Deep filtering is filtering on a relation's fields.
Expand All @@ -329,10 +297,6 @@ Deep filtering is filtering on a relation's fields.

:::

</SideBySideColumn>

<SideBySideColumn>

<br />

<ApiCall>
Expand Down Expand Up @@ -397,9 +361,6 @@ await request(`/api/restaurants?${query}`);

</details>

</SideBySideColumn>
</SideBySideContainer>

## Locale

:::prerequisites
Expand All @@ -410,8 +371,6 @@ await request(`/api/restaurants?${query}`);

The `locale` API parameter can be used to work with entries from a specific locale (see [Internationalization documentation](/dev-docs/i18n#rest)).

<SideBySideContainer>
<SideBySideColumn>

## Status

Expand All @@ -432,10 +391,6 @@ In the response data, the `publishedAt` field is `null` for drafts.
Since published versions are returned by default, passing no status parameter is equivalent to passing `status=published`.
:::

</SideBySideColumn>

<SideBySideColumn>

<br /><br />

<ApiCall>
Expand Down Expand Up @@ -503,6 +458,3 @@ await request(`/api/articles?${query}`);
```

</details>

</SideBySideColumn>
</SideBySideContainer>
18 changes: 0 additions & 18 deletions docusaurus/docs/dev-docs/api/rest/sort-pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,11 @@ The sorting order can be defined with:
- `:asc` for ascending order (default order, can be omitted)
- or `:desc` for descending order.

<SideBySideContainer>
<SideBySideColumn>

### Example: Sort using 2 fields

You can sort by multiple fields by passing fields in a `sort` array.

</SideBySideColumn>

<SideBySideColumn>

<br />

<ApiCall>
Expand Down Expand Up @@ -130,20 +124,10 @@ await request(`/api/restaurants?${query}`);

</details>

</SideBySideColumn>
</SideBySideContainer>

<SideBySideContainer>
<SideBySideColumn>

### Example: Sort using 2 fields and set the order

Using the `sort` parameter and defining `:asc` or `:desc` on sorted fields, you can get results sorted in a particular order.

</SideBySideColumn>

<SideBySideColumn>

<br />

<ApiCall>
Expand Down Expand Up @@ -222,8 +206,6 @@ await request(`/api/restaurants?${query}`);

</details>

</SideBySideColumn>
</SideBySideContainer>

## Pagination

Expand Down

0 comments on commit 3572bf9

Please sign in to comment.