Reference
Every public endpoint, with an example request and response. Responses are UTF-8 JSON. Unknown paths return a JSON error with status 404.
/v1/commands
Returns the full list of commands. Each item has a name, a category id, a usage line and a one-sentence summary.
Request
curl -s https://api.gitcontrol.ir/v1/commands
Response
{
"data": [
{
"name": "commit",
"category": "snapshot",
"usage": "git commit -m <message>",
"summary": "Record staged changes as a new commit."
}
],
"total": 22
}
/v1/categories
Returns the category ids used by /v1/commands, with a display label and a command count.
Response
{
"data": [
{ "id": "undo", "label": "Undoing changes", "commands": 4 }
],
"total": 6
}
/v1/version
Returns the running API version and its release date.
Response
{
"api": "1.4.2",
"released": "2026-10-14"
}
/v1/status
Returns the overall state and the state of each component. The status page reads this endpoint.
Response
{
"status": "operational",
"components": [
{ "id": "api", "name": "API", "status": "operational" }
]
}
/v1/health
Returns 200 with a small body while the service is up. Use it for uptime monitors.
Response
{ "status": "ok" }
Errors
Errors use the same JSON shape. Account and key management paths require a bearer token and return 401 without one.
{
"error": "Not Found"
}