Harthelm Docs

Branch, commit and changes of /data/app

Read by the IDE agent. Needs `workspace.view`; 409 when the IDE does not run.

Generated from openapi/harthelm.yaml at v1.5.0
GET
/workspaces/{ws}/git

Authorization

cookie__Host-harthelm_session<token>

Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header Harthelm-CSRF: 1 and a matching Origin.

Path Parameters

ws*integer

Numeric resource id.

Formatint64
Range1 <= value

Response Body

The status.

application/json
  1. response
repository*boolean

Whether /data/app is a Git work tree.

branch?string

Absent when detached.

commit?string
upstream?string

The tracked branch, e.g. origin/main.

ahead?integer
Range0 <= value
behind?integer
Range0 <= value
dirty*boolean
changed_files*integer
Range0 <= value
fetch_error?string

Why the IDE agent's last background fetch (every 5 minutes) failed, e.g. the git remote did not answer within 30s (0.11.1); absent before the first fetch and after one that worked. behind is as old as the last fetch that worked.

curl -X GET 'https://console.example.com/api/v1/workspaces/1/git'
{  "repository": true,  "branch": "string",  "commit": "string",  "upstream": "string",  "ahead": 0,  "behind": 0,  "dirty": true,  "changed_files": 0,  "fetch_error": "string"}