Skip to content

sessions module route (requires sessions:run:read)

GET
/v1/m/sessions/runs/{ref}/git
curl --request GET \
--url https://example.com/v1/m/sessions/runs/example/git \
--header 'Authorization: Bearer <token>'

Returns the current branch, local branches, working-tree status and write policy in the session’s folder.

ref
required
string

Path parameter ref.

X-Olivares-Tenant
string format: uuid

Target tenant id; required when the principal can act in more than one tenant.

Confined local Git status and folder write policy

Media type application/json
object
branch
required

Current local branch; empty for detached HEAD.

string
branches
required
Array<string>
<= 200 items
files
required
Array<object>
<= 200 items
object
index
required
string
path
required
string
worktree
required
string
truncated
required
boolean
writable
required
boolean
Example generated
{
"branch": "example",
"branches": [
"example"
],
"files": [
{
"index": "example",
"path": "example",
"worktree": "example"
}
],
"truncated": true,
"writable": true
}

Bad request

Media type application/json
object
Example generated
{}

Unauthenticated

Media type application/json
object
Example generated
{}

Forbidden

Media type application/json
object
Example generated
{}

Not found

Media type application/json
object
Example generated
{}

Git refused the operation, the workspace changed, or the work lease is stale

Media type application/json
object
Example generated
{}

Unsupported isolation or Git output limit exceeded

Media type application/json
object
Example generated
{}

Rate limited

Media type application/json
object
Example generated
{}

Session OS boundary could not be established; no unconfined fallback

Media type application/json
object
Example generated
{}

Session confinement, Git, policy or store is unavailable

Media type application/json
object
Example generated
{}