Skip to main content
GET
/
v2
/
sandcastles
/
{id}
/
library
/
diff
Diff Library (dry run)
curl --request GET \
  --url https://app.textql.com/v2/sandcastles/{id}/library/diff \
  --header 'Authorization: Bearer <token>'
{
  "has_changes": true,
  "diffs": [
    {
      "name": "<string>",
      "old_path": "<string>",
      "new_path": "<string>",
      "additions": 123,
      "deletions": 123,
      "is_new": true,
      "is_delete": true,
      "is_rename": true,
      "is_binary": true
    }
  ],
  "raw_diff": "<string>"
}
A read-only dry run: it shows what Create Library Patch would write back, so an agent can decide whether there’s anything to persist before authoring a patch. It never commits and never advances the baseline.
The diff is scoped to your OWNERS permissions — the library mount the session sees was pruned at materialization, so only paths you may edit can appear here.
This dry run is best-effort, not read-after-write consistent. Because the diff is computed over a shared network filesystem with attribute caching, an edit you just wrote can briefly read back as has_changes: false. Don’t treat a single has_changes: false immediately after a write as authoritative — the authoritative result is the diff returned by Create Library Patch itself.

Authorizations

Authorization
string
header
required

API key or JWT token

Path Parameters

id
string
required

Sandbox ID

Response

Pending library changes

has_changes
boolean

True when the library differs from its baseline snapshot.

diffs
object[]
raw_diff
string

The unified git diff, normalized to library-relative paths.