Skip to content

Commit d8e5f82

Browse files
authored
Merge pull request #485 from andimov/patch-1
Rest API. Store header usage in ACCS
2 parents 18cd3fe + 877e665 commit d8e5f82

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

src/pages/rest/index.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The APIs can be used to perform a wide array of tasks. For example:
2121

2222
<Edition name="paas" />
2323

24-
[Adobe Commerce on Cloud](https://experienceleague.adobe.com/en/docs/commerce-on-cloud/user-guide/overview?lang=en), Adobe Commerce on-premises, and [Magento Open Source](https://experienceleague.adobe.com/docs/magento-open-source/user-guide/overview/overview.html?lang=en) all use the same REST API framework. The REST API documentation describes the REST APIs that are available in these versions of Adobe Commerce and Magento Open Source.
24+
[Adobe Commerce on Cloud](https://experienceleague.adobe.com/en/docs/commerce-on-cloud/user-guide/overview?lang=en), Adobe Commerce on-premises, and [Magento Open Source](https://experienceleague.adobe.com/en/docs/commerce-admin/start/guide-overview) all use the same REST API framework. The REST API documentation describes the REST APIs that are available in these versions of Adobe Commerce and Magento Open Source.
2525

2626
### Endpoints
2727

@@ -63,8 +63,27 @@ The authentication system supports both [interactive user-based workflows](./aut
6363

6464
### URL structure
6565

66-
The URL structure for your REST endpoints will be slightly different in Adobe Commerce as a Cloud Service. In addition to your base URL changing, the route no longer contains the string `/rest`, nor does it contain the store view code. The store view code is specified in the `Store` header of the request.
66+
In Adobe Commerce as a Cloud Service, REST endpoint URLs do not include `/rest` or the store view code. The store scope is specified via the `Store` HTTP header.
6767

68-
Cloud Service URLs use the following format:
68+
* Base format:
6969

70-
`https://<server>.api.commerce.adobe.com/<tenant-id>/<endpoint>`
70+
`https://<server>.api.commerce.adobe.com/<tenant-id>/<endpoint>`
71+
72+
* Set the scope with the `Store` header:
73+
74+
* Predefined values:
75+
76+
* `Store: all` — Execute in the global scope
77+
* `Store: default` — Target the default store view (or use your specific store view code)
78+
79+
* You can also pass any specific store view code: `Store: <store_view_code>`
80+
81+
The following `curl` command shows the request pattern:
82+
83+
```bash
84+
curl --location 'https://<server>.api.commerce.adobe.com/<tenant-id>/<endpoint>' \
85+
--header 'Authorization: Bearer <token>' \
86+
--header 'Content-Type: application/json' \
87+
--header 'Store: <all | default | <store_view_code>>'
88+
....
89+
```

0 commit comments

Comments
 (0)