Pull 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.
- 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:
elastic.snaplogic.com
For the UAT or EMEA control plane, substitute the name for elastic. For
example:
|
project_path |
Required. The path to the SnapLogic project.
Format: Important: The path comparison is case-sensitive.
|
Query parameters
None.
Request header
Basic authentication
In the request header, specify Basic for authorization, add your credentials (Login and password of your SnapLogic user or service account), and specify application/json for content type.
For more details on accounts refer to Manage accounts.
Authorization: Basic {base64_encoded <email>:<password>}
Content-Type: application/json
Example of Basic authenthication using Postman
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.