Git Connections
Operations about Git connections
Returns a cursor-paginated list of Git connections.
The maximum number of items to return.
100Example: 100Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
GET /api/v1/git-connections HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": "text",
"name": "text",
"repositoryUrl": "text",
"branchName": "text",
"connectionType": "ssh",
"keyGeneratorType": "ed25519",
"baseCommit": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
],
"nextCursor": "text"
}Creates a Git connection and its authentication material. Only one Git connection can exist.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
Conflict
Unsupported media type.
POST /api/v1/git-connections HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 146
{
"name": "text",
"repositoryUrl": "text",
"branchName": "text",
"connectionType": "ssh",
"keyGeneratorType": "ed25519",
"username": "text",
"password": "text"
}{
"id": "text",
"name": "text",
"repositoryUrl": "text",
"branchName": "text",
"connectionType": "ssh",
"publicKey": "text",
"keyGeneratorType": "ed25519",
"baseCommit": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Operation successful.
Unauthorized
Forbidden
The specified resource was not found.
GET /api/v1/git-connections/{id} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "text",
"name": "text",
"repositoryUrl": "text",
"branchName": "text",
"connectionType": "ssh",
"publicKey": "text",
"keyGeneratorType": "ed25519",
"baseCommit": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Updates only the supplied fields. Secrets are never returned.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Unsupported media type.
PUT /api/v1/git-connections/{id} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 146
{
"name": "text",
"repositoryUrl": "text",
"branchName": "text",
"connectionType": "ssh",
"keyGeneratorType": "ed25519",
"username": "text",
"password": "text"
}{
"id": "text",
"name": "text",
"repositoryUrl": "text",
"branchName": "text",
"connectionType": "ssh",
"publicKey": "text",
"keyGeneratorType": "ed25519",
"baseCommit": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Deletes a Git connection and its local files.
Operation successful.
No content
Unauthorized
Forbidden
The specified resource was not found.
DELETE /api/v1/git-connections/{id} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
No content
Clones the repository into local storage. Safe to call repeatedly.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Unsupported media type.
POST /api/v1/git-connections/{id}/clone HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 21
{
"branchName": "text"
}{
"id": "text",
"name": "text",
"repositoryUrl": "text",
"branchName": "text",
"connectionType": "ssh",
"publicKey": "text",
"keyGeneratorType": "ed25519",
"baseCommit": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Removes the local clone. The connection and its authentication material are retained.
Operation successful.
Unauthorized
Forbidden
The specified resource was not found.
POST /api/v1/git-connections/{id}/disconnect HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"id": "text",
"name": "text",
"repositoryUrl": "text",
"branchName": "text",
"connectionType": "ssh",
"publicKey": "text",
"keyGeneratorType": "ed25519",
"baseCommit": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Exports all team projects, commits them, and pushes to the configured branch. Personal projects are ignored. Requires the repository to be cloned first.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Unsupported media type.
The requested service is temporarily unavailable.
POST /api/v1/git-connections/{id}/push HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"commitMessage": "text",
"force": true
}{
"connectionId": "text",
"counts": {
"workflows": 1,
"folders": 1,
"credentials": 1,
"dataTables": 1,
"variables": 1,
"tags": 1
},
"commitSha": "text"
}Operation successful.
Unauthorized
Forbidden
The specified resource was not found.
GET /api/v1/git-connections/{id}/projects HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"projectIds": [
"text"
]
}Adds a team project to the connection. A project can be added to only one connection.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Conflict
POST /api/v1/git-connections/{id}/projects/{projectId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"projectId": "text",
"gitConnectionId": "text"
}Operation successful.
No content
Unauthorized
Forbidden
The specified resource was not found.
Conflict
DELETE /api/v1/git-connections/{id}/projects/{projectId} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
No content
Resets the local clone to the configured branch tip and imports projects into the instance, overwriting to match. Requires the repository to be cloned first.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Conflict
Unprocessable Entity
The requested service is temporarily unavailable.
POST /api/v1/git-connections/{id}/pull HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"connectionId": "text",
"counts": {
"projects": {
"created": 1,
"updated": 1,
"skipped": 1,
"deleted": 1
},
"folders": {
"created": 1,
"skipped": 1,
"removed": 1
},
"workflows": {
"created": 1,
"updated": 1,
"skipped": 1,
"archived": 1,
"deleted": 1,
"publishing": {
"published": 1,
"unpublished": 1,
"unchanged": 1,
"blocked": 1,
"failed": 1
}
},
"credentials": {
"matched": 1,
"stubbed": 1
},
"dataTables": {
"matched": 1,
"created": 1
},
"variables": {
"matched": 1,
"created": 1,
"updated": 1,
"stubbed": 1,
"missing": 1
},
"tags": {
"matched": 1,
"created": 1,
"renamed": 1,
"reconciled": 1,
"skipped": 1
}
},
"commitSha": "text"
}Last updated
Was this helpful?