Generate a page diff
POST
/api/content/management/packages/{repo}/{packageName}/page-diff
const url = 'https://example.com/api/content/management/packages/example/example/page-diff';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"sectionPath":"/products","pageSlug":"about-us","changeType":"UPDATE"}'};
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/page-diff \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "sectionPath": "/products", "pageSlug": "about-us", "changeType": "UPDATE" }'Generates a page diff for a changed page in a package and stores it under an ephemeral key. Requires the packages.diff.view permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”repo
required
Repository name or ID
string
packageName
required
Package name
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
sectionPath
Section path of the changed page
string
Example
/productspageSlug
Slug of the changed page
string
Example
about-uschangeType
Type of change being diffed
string
Example
UPDATEResponses
Section titled “Responses”Page diff generated
Media typeapplication/json
object
diffKey
required
Ephemeral key identifying the generated diff
string
url
required
URL to view the rendered diff HTML
string
expiresInSeconds
required
Seconds until the diff key expires
number
Example
{ "expiresInSeconds": 3600}Access denied
Media typeapplication/json
object
error
required
Indicates an error occurred
boolean
message
required
Error message describing what went wrong
string
Example
{ "error": true, "message": "Item not found"}