Source Control
Operations about source control
Previews the pending changes between the instance and the connected Git branch in either the push or pull direction.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
GET /api/v1/source-control/status?direction=push HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"data": [
{
"file": "text",
"id": "text",
"name": "text",
"type": "credential",
"status": "new",
"location": "local",
"conflict": true,
"updatedAt": "text",
"pushed": true,
"isLocalPublished": true,
"isRemoteArchived": true,
"parentFolderId": "text",
"folderPath": [
"text"
],
"remoteFolderPath": [
"text"
],
"owner": {
"type": "personal",
"projectId": "text",
"projectName": "text"
},
"publishingError": "text",
"publishingErrorDetails": {
"reason": "review_pending",
"workflowReviewRequestId": "text",
"versionId": "text"
},
"contentImportPolicy": {
"violations": [
{
"kind": "text",
"checkId": "text",
"message": "text",
"subject": "text",
"subjectType": "text",
"scope": "text",
"matchedRuleId": "text"
}
],
"checkErrors": [
{
"checkId": "text",
"correlationId": "text"
}
]
}
}
]
}Commits and pushes the selected files to the connected Git branch. Each entry in fileNames is resolved against a fresh preview of the pending changes.
Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The push includes files with unresolved conflicts. Retry with force: true to push anyway.
Unsupported media type.
POST /api/v1/source-control/push HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 85
{
"commitMessage": "text",
"fileNames": [
{
"id": "text",
"type": "credential"
}
],
"force": true
}{
"data": [
{
"file": "text",
"id": "text",
"name": "text",
"type": "credential",
"status": "new",
"location": "local",
"conflict": true,
"updatedAt": "text",
"pushed": true,
"isLocalPublished": true,
"isRemoteArchived": true,
"parentFolderId": "text",
"folderPath": [
"text"
],
"remoteFolderPath": [
"text"
],
"owner": {
"type": "personal",
"projectId": "text",
"projectName": "text"
},
"publishingError": "text",
"publishingErrorDetails": {
"reason": "review_pending",
"workflowReviewRequestId": "text",
"versionId": "text"
},
"contentImportPolicy": {
"violations": [
{
"kind": "text",
"checkId": "text",
"message": "text",
"subject": "text",
"subjectType": "text",
"scope": "text",
"matchedRuleId": "text"
}
],
"checkErrors": [
{
"checkId": "text",
"correlationId": "text"
}
]
}
}
]
}Fetches changes from the connected Git branch into the instance.
Discard local changes and force the pull to complete.
Controls automatic workflow publishing after import:
none: Keep workflows in their local published state (default)all: Publish all imported workflowspublished: Publish only workflows that were published locally before import
nonePossible values: Operation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
Conflict due to uncommitted local changes or merge conflicts. The response body lists every file in the pull diff; files causing the conflict have conflict: true or status: modified. Retry with force: true to discard local changes.
Unsupported media type.
POST /api/v1/source-control/pull HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"force": true,
"autoPublish": "none"
}[
{
"file": "text",
"id": "text",
"name": "text",
"type": "credential",
"status": "new",
"location": "local",
"conflict": true,
"updatedAt": "text",
"pushed": true,
"isLocalPublished": true,
"isRemoteArchived": true,
"parentFolderId": "text",
"folderPath": [
"text"
],
"remoteFolderPath": [
"text"
],
"owner": {
"type": "personal",
"projectId": "text",
"projectName": "text"
},
"publishingError": "text",
"publishingErrorDetails": {
"reason": "review_pending",
"workflowReviewRequestId": "text",
"versionId": "text"
},
"contentImportPolicy": {
"violations": [
{
"kind": "text",
"checkId": "text",
"message": "text",
"subject": "text",
"subjectType": "text",
"scope": "text",
"matchedRuleId": "text"
}
],
"checkErrors": [
{
"checkId": "text",
"correlationId": "text"
}
]
}
}
]Last updated
Was this helpful?