You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docusaurus/docs/dev-docs/api/client.md
+32-28Lines changed: 32 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,17 @@
1
1
---
2
-
title: JavaScript SDK
2
+
title: Strapi Client
3
+
description: The Strapi Client library simplifies interactions with your Strapi back end, providing a way to fetch, create, update, and delete content.
3
4
displayed_sidebar: devDocsSidebar
4
5
tags:
5
6
- API
6
7
- Content API
7
8
- documentId
8
-
- JavaScript SDK
9
+
- Strapi Client
9
10
---
10
11
11
-
# JavaScript SDK
12
+
# Strapi Client
12
13
13
-
The Strapi JavaScript SDK simplifies interactions with your Strapi back end, providing a way to fetch, create, update, and delete content. This guide walks you through setting up the JavaScript SDK, configuring authentication, and using its key features effectively.
14
+
The Strapi Client library simplifies interactions with your Strapi back end, providing a way to fetch, create, update, and delete content. This guide walks you through setting up the Strapi Client, configuring authentication, and using its key features effectively.
14
15
15
16
## Getting Started
16
17
:::prerequisites
@@ -20,60 +21,60 @@ The Strapi JavaScript SDK simplifies interactions with your Strapi back end, pro
20
21
21
22
### Installation
22
23
23
-
To use the JavaScript SDK in your project, install it as a dependency using your preferred package manager:
24
+
To use the Strapi Client in your project, install it as a dependency using your preferred package manager:
24
25
25
26
<TabsgroupId="yarn-npm">
26
27
<TabItemvalue="yarn"label="Yarn">
27
28
28
29
```bash
29
-
yarn add @strapi/sdk-js
30
+
yarn add @strapi/client
30
31
```
31
32
32
33
</TabItem>
33
34
<TabItemvalue="npm"label="NPM">
34
35
35
36
```bash
36
-
npm install @strapi/sdk-js
37
+
npm install @strapi/client
37
38
```
38
39
39
40
</TabItem>
40
41
<TabItemvalue="pnpm"label="pnpm">
41
42
42
43
```bash
43
-
pnpm add @strapi/sdk-js
44
+
pnpm add @strapi/client
44
45
```
45
46
46
47
</TabItem>
47
48
</Tabs>
48
49
49
50
### Basic configuration
50
51
51
-
To start interacting with your Strapi back end, initialize the JavaScript SDK and set the base API URL:
52
+
To start interacting with your Strapi back end, initialize the Strapi Client and set the base API URL:
@@ -94,15 +95,15 @@ The JavaScript SDK provides the following key properties and methods for interac
94
95
95
96
### General purpose fetch
96
97
97
-
The JavaScript SDK provides access to the underlying JavaScript `fetch` function to make direct API requests. The request is always relative to the base URL provided during SDK initialization:
98
+
The Strapi Client provides access to the underlying JavaScript `fetch` function to make direct API requests. The request is always relative to the base URL provided during client initialization:
Collection types in Strapi are entities with multiple entries (e.g., a blog with many posts). The JavaScript SDK provides a `collection()` method to interact with these resources, with the following methods available:
106
+
Collection types in Strapi are entities with multiple entries (e.g., a blog with many posts). The Strapi Client provides a `collection()` method to interact with these resources, with the following methods available:
Single types in Strapi represent unique content entries that exist only once (e.g., the homepage settings or site-wide configurations). The JavaScript SDK provides a `single()` method to interact with these resources, with the following methods available:
141
+
Single types in Strapi represent unique content entries that exist only once (e.g., the homepage settings or site-wide configurations). The Strapi Client provides a `single()` method to interact with these resources, with the following methods available:
Copy file name to clipboardExpand all lines: docusaurus/docs/dev-docs/api/content-api.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ From a front-end application, your content can be accessed through Strapi's Cont
22
22
- by default through the [REST API](/dev-docs/api/rest)
23
23
- and also through the [GraphQL API](/dev-docs/api/graphql) if you installed the Strapi built-in [GraphQL plugin](/dev-docs/plugins/graphql).
24
24
25
-
You can also use the [JavaScript SDK](/dev-docs/api/sdk-js) to interact with the REST API.
25
+
You can also use the [Strapi Client](/dev-docs/api/client) to interact with the REST API.
26
26
27
27
REST and GraphQL APIs represent the top-level layers of the Content API exposed to external applications. Strapi also provides 2 lower-level APIs:
28
28
@@ -47,7 +47,7 @@ This documentation section includes reference information about the following St
47
47
48
48
<CustomDocCardemoji="↕️"title="GraphQL API"description="Query the Content API from a front-end application through GraphQL."link="/dev-docs/api/graphql" />
49
49
50
-
<CustomDocCardemoji="↕️"title="JavaScript SDK"description="Interact with the REST API through the JavaScript SDK."link="/dev-docs/api/sdk-js" />
50
+
<CustomDocCardemoji="↕️"title="Strapi Client"description="Interact with the REST API through the Strapi Client library."link="/dev-docs/api/client" />
51
51
52
52
<CustomDocCardemoji="🔃"title="Document Service API"description="Query your data through the backend server or plugins."link="/dev-docs/api/document-service" />
Copy file name to clipboardExpand all lines: docusaurus/docs/dev-docs/api/rest.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,8 +30,8 @@ By default, the REST API responses only include top-level fields and does not po
30
30
The Upload plugin (which handles media found in the [Media Library](/user-docs/media-library)) has a specific API described in the [Upload plugin documentation](/dev-docs/plugins/upload).
31
31
:::
32
32
33
-
:::strapi Strapi SDK <NewBadge />
34
-
Strapi has just released a new SDK, currently in beta. Early documentation is available on the [repository](https://github.com/strapi/sdk-js) while we are integrating it into the official REST API reference.
33
+
:::strapi Strapi Client
34
+
The [Strapi Client](/dev-docs/api/client) library simplifies interactions with your Strapi back end, providing a way to fetch, create, update, and delete content.
Copy file name to clipboardExpand all lines: docusaurus/docs/dev-docs/whats-new.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,8 @@ Strapi 5 brings many new features and improvements, and this page quickly highli
23
23
24
24
<Iconname="detective"/> The **[REST API](/dev-docs/api/rest)** and **[GraphQL API](/dev-docs/api/graphql)** have been updated, with a simplified response data format for both and partial support for Relay-style queries for GraphQL.
25
25
26
+
<Iconname="plugs" /> The **[Strapi Client](/dev-docs/api/client)** library simplifies interactions with your Strapi back end, providing a way to fetch, create, update, and delete content.
27
+
26
28
<Iconname="puzzle-piece" /> The **[Plugin SDK](/dev-docs/plugins/development/plugin-sdk)** is a new CLI tool that helps you develop and publish Strapi plugins.
27
29
28
30
<Iconname="escalator-up" /> Another whole new CLI **[upgrade tool](/dev-docs/upgrade-tool)** will help you migrate to any patch, minor, and major version of Strapi, automating most of the common tasks through codemods.
0 commit comments