GET /sessions/{session_id}/diff
Return the session's uncommitted changes as a patch.
TypeScript SDKThe npm client, generated from the API spec.Python SDKThe PyPI client, sync and async.
| Method | Path |
|---|---|
| GET | /v1/sessions/{session_id}/diff |
One unified-diff section per changed file, captured from the sandbox's working tree when the session ended. The per-file counts ride on the session itself (`git.repos[].files`); this is the text behind them. Empty when the tree was clean. A sandbox token may read only its own session's diff.
Path parameters
session_idstringrequired
curl "https://api.ellipsis.dev/v1/sessions/{session_id}/diff" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY"import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.sessions.diff("...")
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.sessions.diff('...');
console.log(result);Request
Response
Example response · 200
{
}