Skip to content

Generate a page diff

POST
/api/content/management/packages/{repo}/{packageName}/page-diff
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.

repo
required

Repository name or ID

string
packageName
required

Package name

string
Media typeapplication/json
object
sectionPath

Section path of the changed page

string
Example
/products
pageSlug

Slug of the changed page

string
Example
about-us
changeType

Type of change being diffed

string
Allowed values: UPDATE ADD REMOVE BASE_ADD BASE_REMOVE
Example
UPDATE

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"
}