Pull the latest project files from Git

POST /project/pull/{project_path}

Overview

This API updates the specified project with the latest files from the associated Git repository. Equivalent to git pull.

You can use Git APIs in Continuous Integration / Continuous Deployment (CI/CD) workflows to pull files from Git repositories.

Note:
  • The project must already be associated with a Git repository.
  • You can track a maximum of 1000 assets per project. If a check-in would exceed 1000 assets in the repository or if you try to check out a project with more than 1000 assets, an error is thrown.
  • You must use the SnapLogic Manager UI or Git tools to commit changes to your repository.

Prerequisites

  • Write access to the assets to be added or updated

Limitations

  • You cannot use SnapLogic service accounts to call any of the SnapLogic Git operation APIs.

Request

 POST https://{controlplane_path}/api/1/rest/public/project/pull/{project_path}

Path Parameters

Key Description
controlplane_path Required. The path to the SnapLogic control plane.

Example: control-plane-name.snaplogic.com

Where control-plane-name is the control plane you are using. For example,
  • elastic
  • uat
  • emea
project_path
Required. The path to the SnapLogic project.

Format: /{env_org}/{project_space}/{project_name}

Important: The path comparison is case-sensitive.

Query Parameters

None.

Request Header

Specify Basic for authorization and application/json for content type.


Authorization: Basic {your_encoded_security_credentials}
Content-Type: application/json
          

Request Body

   //To overwrite local changes with the versions in the repository.
  {
  "use_theirs": ["65e12ed44f526dee5878a380","65e12ed482f42d881560dfca"]
  }
  
  //To keep local changes and ignore conflicting versions from the repository.
  {
  "use_ours":["65e12ed44f526dee5878a380","65e12ed482f42d881560dfca"]
  }
Key Type Description
use_theirs array An array containing the snode IDs of the assets in the local project to be overwritten with those from the git repository.
use_ours array An array containing the snode IDs of the assets in the local project to retain their state ignoring the corresponding updates to them in the git repository.

Response

Status code only.