Cert++
Close

Resource permission entries: resource_id patterns, methods and version ranges

Key Takeaway

OCAPI allows nothing by default, so every call a client makes needs a matching resource entry. A subresource such as /products/*/images is a separate resource from its base resource /products/*, so it needs its own entry.

OCAPI client permissions are JSON entries in Business Manager that say which API resources a client application may call. Each entry also says which HTTP methods the client may use and, optionally, which OCAPI versions the entry applies to. Whether a client's calls succeed or fail depends on these entries.

How to configure OCAPI permissions
  1. In Business Manager, go to "Administration > Site Development > Open Commerce API Settings".
  2. Select the API type, such as Shop or Data.
  3. Select a context: "Global" for all sites, or the name of one site.
  4. Edit the JSON document.
  5. Click "Save".

Saved settings are cached for up to three minutes before they take effect, so a new permission may not work right away.

Permissions can be global or site-specific. For a specific site, you can override the global settings for a client ID. Most Data API resources are organization-specific, so they support only global client permissions.

B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other B2C Commerce Developer studiers. 796 members and growing.