Skip to main content
GET
Diff one source file

Authorizations

Authorization
string
header
required

Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.

Query Parameters

websiteId
string
required
Minimum string length: 1
from
string

Base side of the diff: a version number, head, or published. Defaults to published.

Pattern: ^(head|published|[1-9][0-9]*)$
to
string

Target side of the diff: a version number, head, or published. Defaults to head.

Pattern: ^(head|published|[1-9][0-9]*)$
name
string
required

File name to compare.

Minimum string length: 1

Response

The selected file comparison and unified diff.

websiteId
string
required

Id of the website.

name
string
required

Compared file name.

fromVersion
integer
required

Resolved base version.

toVersion
integer
required

Resolved target version.

status
enum<string>
required

How the file differs between the two versions.

Available options:
added,
removed,
modified,
unchanged
diff
string
required

Unified diff hunks.

fromType
enum<string>

File type at the base version, when present.

Available options:
page,
component,
module,
global_css,
not_found,
website_config,
custom_head_start,
custom_head_end,
custom_body_start,
custom_body_end
toType
enum<string>

File type at the target version, when present.

Available options:
page,
component,
module,
global_css,
not_found,
website_config,
custom_head_start,
custom_head_end,
custom_body_start,
custom_body_end
truncated
boolean

true when diff computation or output reached its bound. Read both versions for the full content.