Repository navigation
Manage the Business Manager cartridge path through SCAPI - #839
Merged
Merged
Conversation
Business Manager (Sites-Site) cartridge path updates always ran a site archive import, and 'sites cartridges list --bm' read the SCAPI site resource, which does not exist for Sites-Site. The SCAPI custom-cartridges resource does work for Sites-Site, so use it for reads and updates, with site archive import as the fallback. OCAPI is skipped for BM updates since it cannot update that site.
Contributor
📘 Docs preview🧹 The preview for this PR has been removed (PR closed). |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Business Manager cartridge path commands (
b2c sites cartridges list|add|remove|set --bm) now use the SCAPI Sites APIcustom-cartridgesresource forSites-Site.Previously:
list --bmread the SCAPI site resource, which returns 404 forSites-Site, then fell back to OCAPI and suggested granting OCAPI resources.add/remove/set --bmalways ran a site archive import job, even when SCAPI was configured.Now BM reads and updates go through
GET/PUT .../sites/Sites-Site/custom-cartridges(scopesfcc.sites.rw). If SCAPI isn't configured, the instance prefers OCAPI, or the SCAPI call is rejected, updates fall back to site archive import as before. OCAPI is not tried for BM updates since it can't update that site, and the fallback error no longer recommends OCAPI resources forSites-Site.No breaking changes.
Testing
Manual, against an instance with a SCAPI-capable API client (
sfcc.sites.rw) andshortCode/tenantIdconfigured:b2c sites cartridges list --bmshows the BM cartridge path (previously failed or fell back to OCAPI).b2c sites cartridges set "<current path>" --bm --log-level debugshows aPUT .../sites/Sites-Site/custom-cartridgesrequest and no site archive import job.b2c sites cartridges add <name> --bmthenremove <name> --bmround-trips without running an import job.--api-backend ocapi,set --bmstill uses site archive import.