For the complete documentation index, see llms.txt. This page is also available as Markdown.

Source Control

Operations about source control

Preview pending source control changes

get
/source-control/status

Previews the pending changes between the instance and the connected Git branch in either the push or pull direction.

Authorizations
X-N8N-API-KEYstringRequired
Query parameters
directionstring · enumRequiredPossible values:
Responses
200

Operation successful.

application/json
get/source-control/status
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"
          }
        ]
      }
    }
  ]
}

Push local source control changes

post
/source-control/push

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.

Authorizations
X-N8N-API-KEYstringRequired
Body
commitMessagestring · min: 1 · max: 1000Required
forcebooleanOptional
Responses
200

Operation successful.

application/json
post/source-control/push
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"
          }
        ]
      }
    }
  ]
}

Pull changes from the remote repository

post
/source-control/pull

Fetches changes from the connected Git branch into the instance.

Authorizations
X-N8N-API-KEYstringRequired
Body
forcebooleanOptional

Discard local changes and force the pull to complete.

autoPublishstring · enumOptional

Controls automatic workflow publishing after import:

  • none: Keep workflows in their local published state (default)
  • all: Publish all imported workflows
  • published: Publish only workflows that were published locally before import
Default: nonePossible values:
Responses
200

Operation successful.

application/json
filestringRequired
idstringRequired
namestringRequired
typestring · enumRequiredPossible values:
statusstring · enumRequiredPossible values:
locationstring · enumRequiredPossible values:
conflictbooleanRequired
updatedAtstringRequired
pushedbooleanOptional
isLocalPublishedbooleanOptional
isRemoteArchivedbooleanOptional
parentFolderIdstring · nullableOptional
folderPathstring[]Optional
remoteFolderPathstring[]Optional
publishingErrorstringOptional
post/source-control/pull
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?