This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.
You can create a new branch for a site owner to edit and provide a button that directs them to the editor to make changes. This is useful when building apps that let site owners test changes in an isolated environment before applying them to their live site.
To create a branch and redirect a site owner for editing:
Call Create Branch. Specify a name for the branch and set the sourceType to SOURCE_BRANCH with sourceBranchProperties containing the ID of the branch to copy from (typically the site's original branch or current working branch). Collect the branch id from the response.
Call Get Editor URLs to retrieve the appropriate editor URL for the site.
Append the branch ID as a query parameter to the editor URL. For example:
Display a button or link in your app interface. When the site owner clicks it, redirect them to the generated URL to begin editing the new branch.
You can use tags to organize and categorize branches across multiple sites, making it easier to manage test sites at scale. This is useful when building apps that help agencies or developers manage branches across many client sites.
To organize branches using tags:
ready-for-review, qa-testing, or client-approved.tags field of the branch object.tags field. Make sure to include the current revision number to prevent conflicting changes.tags field to retrieve branches that match your tagging criteria.