Inspect

Get session diff

Retrieve the raw unified diff for an authorized Inspect session. The endpoint is session-scoped and does not accept arbitrary diff file IDs. Pending or running sessions return the local working-tree diff when one is available; otherwise the stored authoritative session diff is returned.

Base URL
GET
/api/public/v1/sessions/{session_id}/diff

Retrieve the raw unified diff for an authorized Inspect session. The endpoint is session-scoped and does not accept arbitrary diff file IDs. Pending or running sessions return the local working-tree diff when one is available; otherwise the stored authoritative session diff is returned.

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

Path Parameters

session_id*string

The unique identifier of the session

Query Parameters

repository?string

Repository ID whose diff should be returned. Must be a constituent repository of the session workspace. Defaults to the first repository in workspace order.

Response Body

Raw unified diff for the session

response?stringtext/plain
Example Request
curl -X GET 'https://your-org.inspect.com/api/public/v1/sessions/string/diff'
Example Response
"string"