Merge an update package
POST
/api/content/management/packages/{repo}/{packageName}/merge
const url = 'https://example.com/api/content/management/packages/example/example/merge';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"confirm":true,"items":["example"],"publishItems":true,"publishSite":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/content/management/packages/example/example/merge \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "confirm": true, "items": [ "example" ], "publishItems": true, "publishSite": true }'Merges package contents into the main repository. Optionally publishes merged items and/or the associated site assets immediately after merge by setting publishItems and publishSite flags.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”repo
required
Repository CACHE_ROOT
string
packageName
required
Package name
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
confirm
Confirm the merge operation
boolean
items
Array of item IDs to merge. If omitted, all package items are merged
Array<string>
publishItems
Publish all merged items after a successful merge. Defaults to false
boolean
publishSite
Publish the package’s associated site assets after a successful merge. Defaults to false. Requires the package to have an associated site
boolean
Examplegenerated
{ "confirm": true, "items": [ "example" ], "publishItems": true, "publishSite": true}Responses
Section titled “Responses”Package merged successfully
Media typeapplication/json
object
success
required
Whether merge was successful
boolean
message
Status message
string
mergedItems
Number of items merged
number
deletedItems
Number of items deleted
number
Examplegenerated
{ "success": true, "message": "example", "mergedItems": 1, "deletedItems": 1}Merge failed