Read a slice of a session's latest snapshot (viewer or above, or a session in the same project)
const url = 'http://127.0.0.1:8080/v1/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/diff';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”A canonical repository path.
A byte offset into the patch, from next_offset. Past the end is 422.
Responses
Section titled “Responses”The slice.
object
object
Canonical repository path, once per snapshot.
A binary file has added and deleted 0.
object
Bytes, on one line, with no outer spaces.
Ignored on input; the coordinator recomputes it.
Canonical repository path.
One line, at most 200 characters.
One line, at most 300 characters.
At most 24576 bytes, from offset.
Null on the last slice.
Bytes in the whole patch, or in the path’s section.
Example
{ "symbols": [ { "kind": "func" } ]}The request is malformed.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}No valid bearer token.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The token may not do this.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}No such resource in the caller’s org.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The request is well formed but breaks a rule or a limit.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}A rate limit or quota stopped the request. Retry-After gives seconds to wait.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}