Skip to content

Read a slice of a session's latest snapshot (viewer or above, or a session in the same project)

GET
/v1/sessions/{session_id}/diff
curl --request GET \
--url http://127.0.0.1:8080/v1/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/diff \
--header 'Authorization: Bearer <token>'

path limits the patch to that file’s section, and offset is a byte offset into that patch. A slice is at most 24 KiB, cut on a UTF-8 boundary. The file and symbol lists always come whole. With no snapshot yet, snapshot_id is null and the lists are empty.

session_id
required
string format: uuid
path
string
>= 1 characters

A canonical repository path.

offset
integer

A byte offset into the patch, from next_offset. Past the end is 422.

The slice.

Media typeapplication/json
object
session_id
required
string format: uuid
snapshot_id
required
string | null format: uuid
base_commit
required
string | null
created_at
required
string | null format: date-time
numstat
required
Array<object>
object
path
required

Canonical repository path, once per snapshot.

string
added
required
integer
deleted
required
integer
binary

A binary file has added and deleted 0.

boolean
symbols
required
Array<object>
object
kind
required
string
Allowed values: func type component route table migration
name
required

Bytes, on one line, with no outer spaces.

string
>= 1 characters <= 200 characters
normalized

Ignored on input; the coordinator recomputes it.

string
path
required

Canonical repository path.

string
lang
required
string
signature

One line, at most 200 characters.

string
doc

One line, at most 300 characters.

string
patch
required

At most 24576 bytes, from offset.

string
offset
required
integer
next_offset
required

Null on the last slice.

integer | null
patch_bytes
required

Bytes in the whole patch, or in the path’s section.

integer
patch_truncated
required
boolean

Example

{
"symbols": [
{
"kind": "func"
}
]
}

The request is malformed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The token may not do this.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

No such resource in the caller’s org.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The request is well formed but breaks a rule or a limit.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

A rate limit or quota stopped the request. Retry-After gives seconds to wait.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}
Retry-After
integer