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
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Magento allows developers to define web API resources and their permissions in a configuration file <code>webapi.xml</code>.
15
15
Here are more details on exposing <ahref="http://devdocs.magento.com/guides/v1.0/extension-dev-guide/service-contracts/service-to-web-service.html">services as Web APIs.</a>
16
16
17
-
Before you can make web API calls, you must authenticate your identity and have requisite permissions (authorization) to access the API resource. Authentication allows Magento to identify the caller's user type. Based on the user's (admin, integration, customer or guest) access rights, API calls' resource acessibility is determined.
17
+
Before you can make web API calls, you must authenticate your identity and have necessary permissions (authorization) to access the API resource. Authentication allows Magento to identify the caller's user type. Based on the user's (admin, integration, customer or guest) access rights, API calls' resource acessibility is determined.
@@ -26,18 +26,18 @@ Before you can make web API calls, you must authenticate your identity and have
26
26
</tr>
27
27
<tr>
28
28
<td>
29
-
<p>Customer</p>
29
+
<p>Admin or Integration</p>
30
30
</td>
31
-
<td>
32
-
<p>Resources with <code>anonymous</code> or <code>self</code> permission.</p>
31
+
<td>e
32
+
<p>Resources for which admins or integrations are authorized. For example, if admins are authorized for the <code>Magento_Customer::group</code> resource, they can make a <code>GET /V1/customerGroups/:id</code> call.</p>
33
33
</td>
34
34
</tr>
35
35
<tr>
36
36
<td>
37
-
<p>Admin or Integration</p>
37
+
<p>Customer</p>
38
38
</td>
39
39
<td>
40
-
<p>Resources for which admins or integrations are authorized. For example, if admins are authorized for the <code>Magento_Customer::group</code> resource, they can make a <code>GET /V1/customerGroups/:id</code> call.</p>
40
+
<p>Resources with <code>anonymous</code> or <code>self</code> permission.</p>
41
41
</td>
42
42
</tr>
43
43
<tr>
@@ -51,10 +51,12 @@ Before you can make web API calls, you must authenticate your identity and have
51
51
</table>
52
52
53
53
<h3id="acl-webapi-relation">Relation between acl.xml and webapi.xml</h3>
54
-
<p>The acl.xml file defines the access control list (ACL) for a given module. It defines available set of permissions to access the resources. acl.xml files across all Magento modules are consolidated to build an ACL tree which is used to select allowed Admin role resources or third party Integration's access (System > Extension > Integration > Add New Integration > Available APIs).
54
+
<p>The acl.xml file defines the access control list (ACL) for a given module. It defines available set of permissions to access the resources.
55
+
acl.xml files across all Magento modules are consolidated to build an ACL tree which is used to select allowed Admin role resources or third party Integration's access (System > Extension > Integration > Add New Integration > Available APIs).
56
+
Overall <ahref="http://www.magentocommerce.com/api/rest/permission_settings/permission_settings.html#PermissionSettings-Authorization">ACL concept</a> remains same as Magento 1, its just been extended to cover WebAPIs.
@@ -126,12 +128,12 @@ When a developer creates the Web API configuration file : webapi.xml, the permis
126
128
.....
127
129
...
128
130
```
129
-
ex:
131
+
e.g.:
130
132
In the above sample webapi.xml, for the customerGroups resource, only a user with a "Magento_Customer::group" can access the GET /V1/customerGroups/:id API. On the other hand, POST /V1/customers (customer creation) can be accessed anonymously (or by a guest) without a need for presenting the identity.
131
133
132
134
The user here can be an admin (or an Integration) defined in the backend with the customer group selected as one of the resource in the ACL tree.
133
135
<divclass="bs-callout bs-callout-info"id="info">
134
-
<p>A guest or anonymous is a special permission that doesn't need to be defined in acl.xml (and will not show up in the acl tree in the backend). It just indicates that the current resource in webapi.xml can be accessed without the need for authentication. Similarly self is a special access if you already have an authenticated session with the system and allows the user to access resources they own. ex GET /V1/customers/me will fetch the logged in customer's details. This is typically useful for javascript based widgets. </p>
136
+
<p>A guest or anonymous is a special permission that doesn't need to be defined in acl.xml (and will not show up in the acl tree in the backend). It just indicates that the current resource in webapi.xml can be accessed without the need for authentication. Similarly self is a special access if you already have an authenticated session with the system and allows the user to access resources they own. e.g. GET /V1/customers/me will fetch the logged in customer's details. This is typically useful for javascript based widgets. </p>
135
137
</div>
136
138
137
139
<h3id="webapi-clients">Web API clients and authentication methods</h3>
@@ -147,7 +149,7 @@ The user here can be an admin (or an Integration) defined in the backend with th
147
149
<p>Mobile application</p>
148
150
</td>
149
151
<td>
150
-
<p>Registered users use <a href="{{ site.gdeurl }}get-started/authentication/gs-authentication-token.html">token-based authentication</a> to make web API calls through a mobile application. The token acts like an electronic key that provides access the API.</p>
152
+
<p>Registered users use <a href="{{ site.gdeurl }}get-started/authentication/gs-authentication-token.html">token-based authentication</a> to make web API calls through a mobile application. The token acts like an electronic key that provides access to the API(s).</p>
151
153
<ol>
152
154
<li>
153
155
<p>As a registered Magento user, you request a token from the Magento token service at the endpoint that is defined for your user type.</p>
0 commit comments