GET /api/developer/v1/servers/{id}/git/deployments
Deployments auflisten
Der Verlauf der Deployments des Servers. Seitenweise Liste: limit (1 bis 100, Standard 25) und cursor. nextCursor ist null auf der letzten Seite, sonst der Wert für den nächsten Aufruf.
Rechte
- git:read Git-Quellen lesen
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
| id | Pfad | string (uuid) | ja | Id des Servers. |
| limit | Query | integer (int32) | nein | Einträge je Seite, 1 bis 100. Standard 25. Ein Wert außerhalb ergibt 400 `VALIDATION_ERROR`. |
| cursor | Query | string | nein | Wert von `nextCursor` der vorherigen Seite. Nicht ändern, nicht auswerten. Ein ungültiger Cursor ergibt 400 `VALIDATION_ERROR`. |
Antworten
OK
application/json
SchemaDevGitDeploymentDtoPage
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
| data | DevGitDeploymentDto[] | ja | |
| data[].id | string (uuid) | ja | |
| data[].sourceId | string (uuid) | ja | |
| data[].kind | string | ja | |
| data[].trigger | string | ja | |
| data[].status | string | ja | |
| data[].phase | string | null | ja | |
| data[].branch | string | ja | |
| data[].targetSha | string | null | ja | |
| data[].deployedSha | string | null | ja | |
| data[].commitMessage | string | null | ja | |
| data[].errorCode | string | null | ja | |
| data[].message | string | null | ja | |
| data[].createdAt | string (date-time) | ja | |
| data[].startedAt | string (date-time) | null | ja | |
| data[].finishedAt | string (date-time) | null | ja | |
| nextCursor | string | null | ja |
{
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sourceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"kind": "string",
"trigger": "string",
"status": "string",
"phase": "string",
"branch": "string",
"targetSha": "string",
"deployedSha": "string",
"commitMessage": "string",
"errorCode": "string",
"message": "string",
"createdAt": "2026-10-05T12:00:00Z",
"startedAt": "2026-10-05T12:00:00Z",
"finishedAt": "2026-10-05T12:00:00Z"
}
],
"nextCursor": "string"
}Codebeispiele
curl "https://api.zenit-hosting.de/api/developer/v1/servers/<id>/git/deployments" \ -H "Authorization: Bearer $ZENIT_TOKEN"
GET /api/developer/v1/servers/{id}/git/deployments/{deploymentId}
Deployment lesen
Ein Deployment mit Status, Phase und Fehlermeldung.
Rechte
- git:read Git-Quellen lesen
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
| id | Pfad | string (uuid) | ja | Id des Servers. |
| deploymentId | Pfad | string (uuid) | ja | Id des Deployments. |
Antworten
OK
application/json
SchemaDevGitDeploymentDto
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
| id | string (uuid) | ja | |
| sourceId | string (uuid) | ja | |
| kind | string | ja | |
| trigger | string | ja | |
| status | string | ja | |
| phase | string | null | ja | |
| branch | string | ja | |
| targetSha | string | null | ja | |
| deployedSha | string | null | ja | |
| commitMessage | string | null | ja | |
| errorCode | string | null | ja | |
| message | string | null | ja | |
| createdAt | string (date-time) | ja | |
| startedAt | string (date-time) | null | ja | |
| finishedAt | string (date-time) | null | ja |
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sourceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"kind": "string",
"trigger": "string",
"status": "string",
"phase": "string",
"branch": "string",
"targetSha": "string",
"deployedSha": "string",
"commitMessage": "string",
"errorCode": "string",
"message": "string",
"createdAt": "2026-10-05T12:00:00Z",
"startedAt": "2026-10-05T12:00:00Z",
"finishedAt": "2026-10-05T12:00:00Z"
}Codebeispiele
curl "https://api.zenit-hosting.de/api/developer/v1/servers/<id>/git/deployments/<deploymentId>" \ -H "Authorization: Bearer $ZENIT_TOKEN"
GET /api/developer/v1/servers/{id}/git/sources
Git-Quellen auflisten
Die Git-Quellen des Servers ohne Zugangsdaten, Webhook-Secrets oder Deploy-Keys.
Rechte
- git:read Git-Quellen lesen
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
| id | Pfad | string (uuid) | ja | Id des Servers. |
Antworten
OK
application/json
SchemaDevGitSourceDto[]
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
| [].id | string (uuid) | ja | |
| [].name | string | ja | |
| [].provider | string | ja | |
| [].repository | string | ja | |
| [].repositoryUrl | string | null | ja | |
| [].branch | string | ja | |
| [].targetDirectory | string | ja | |
| [].autoDeploy | boolean | ja | |
| [].status | string | ja | |
| [].lastDeployment | DevGitDeploymentDto | null | ja | |
| [].lastDeployment.id | string (uuid) | ja | |
| [].lastDeployment.sourceId | string (uuid) | ja | |
| [].lastDeployment.kind | string | ja | |
| [].lastDeployment.trigger | string | ja | |
| [].lastDeployment.status | string | ja | |
| [].lastDeployment.phase | string | null | ja | |
| [].lastDeployment.branch | string | ja | |
| [].lastDeployment.targetSha | string | null | ja | |
| [].lastDeployment.deployedSha | string | null | ja | |
| [].lastDeployment.commitMessage | string | null | ja | |
| [].lastDeployment.errorCode | string | null | ja | |
| [].lastDeployment.message | string | null | ja | |
| [].lastDeployment.createdAt | string (date-time) | ja | |
| [].lastDeployment.startedAt | string (date-time) | null | ja | |
| [].lastDeployment.finishedAt | string (date-time) | null | ja | |
| [].createdAt | string (date-time) | ja |
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"provider": "string",
"repository": "string",
"repositoryUrl": "string",
"branch": "string",
"targetDirectory": "string",
"autoDeploy": true,
"status": "string",
"lastDeployment": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sourceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"kind": "string",
"trigger": "string",
"status": "string",
"phase": "string",
"branch": "string",
"targetSha": "string",
"deployedSha": "string",
"commitMessage": "string",
"errorCode": "string",
"message": "string",
"createdAt": "2026-10-05T12:00:00Z",
"startedAt": "2026-10-05T12:00:00Z",
"finishedAt": "2026-10-05T12:00:00Z"
},
"createdAt": "2026-10-05T12:00:00Z"
}
]Codebeispiele
curl "https://api.zenit-hosting.de/api/developer/v1/servers/<id>/git/sources" \ -H "Authorization: Bearer $ZENIT_TOKEN"
POST /api/developer/v1/servers/{id}/git/sources/{sourceId}/deploy
Deployment auslösen
Reiht ein Deployment mit dem Auslöser api ein (202). Ohne sha wird der Kopf des Branches ausgerollt. Wie ein Deploy aus CI oder per Push wartet es auf das Deploy-Zeitfenster der Quelle: die Antwort bleibt 202, der Lauf startet dann erst mit Beginn des Fensters. Erreicht die Quelle ihren Stundendeckel, kommt 429 RATE_LIMITED mit Retry-After.
Rechte
- git:deploy Git-Deploy auslösen
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
| id | Pfad | string (uuid) | ja | Id des Servers. |
| sourceId | Pfad | string (uuid) | ja | Id der Git-Quelle. |
| Idempotency-Key | Header | string | nein | Empfohlen für jeden POST. 1 bis 128 sichtbare ASCII-Zeichen ohne Leerzeichen. Derselbe Schlüssel mit derselben Anfrage liefert innerhalb von 24 Stunden die gespeicherte Antwort (Header `Idempotency-Replayed: true`), mit einer anderen Anfrage 422, solange die erste läuft 409. |
Request-Body
application/json
SchemaDevGitDeployRequest
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
| sha | string | null | nein |
{
"sha": "string"
}Antworten
Accepted
application/json
SchemaDevGitDeployAcceptedDto
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
| deploymentId | string (uuid) | ja | |
| status | string | ja |
{
"deploymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string"
}Codebeispiele
curl -X POST "https://api.zenit-hosting.de/api/developer/v1/servers/<id>/git/sources/<sourceId>/deploy" \
-H "Authorization: Bearer $ZENIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sha": "string"
}'Bereich Git geladen, 4 Endpunkte.
