Merge a version branch
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"targetName": "<string>",
"deleteAfter": true
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({targetName: '<string>', deleteAfter: true})
};
fetch('https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge"
payload = {
"targetName": "<string>",
"deleteAfter": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge"
payload := strings.NewReader("{\n \"targetName\": \"<string>\",\n \"deleteAfter\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "<string>",
"name": "<string>",
"title": "<string>",
"baseBranchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isDefault": true,
"isProtected": true,
"status": "active",
"lastSyncedAt": "2023-11-07T05:31:56Z",
"createdByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mergedAt": "2023-11-07T05:31:56Z",
"mergedIntoBranchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"fileCount": 123,
"keyCount": 123
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Projects
Merge a version branch
Requires projects:write. Native projects only. Merges the branch onto targetName, or its parent when omitted, as Merge does in the app, and returns the branch merged into. strategy settles conflicted strings: use_branch keeps the merged branch’s text, use_base keeps the target’s. deleteAfter (default true) removes the merged branch’s files and strings; the branch row stays with status: merged. A branch with active child branches returns 409 has_child_branches.
POST
https://public-api.hyperlocalise.com
/
v1
/
projects
/
{projectId}
/
branches
/
{branchName}
/
merge
Merge a version branch
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"targetName": "<string>",
"deleteAfter": true
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({targetName: '<string>', deleteAfter: true})
};
fetch('https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge"
payload = {
"targetName": "<string>",
"deleteAfter": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge"
payload := strings.NewReader("{\n \"targetName\": \"<string>\",\n \"deleteAfter\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "<string>",
"name": "<string>",
"title": "<string>",
"baseBranchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isDefault": true,
"isProtected": true,
"status": "active",
"lastSyncedAt": "2023-11-07T05:31:56Z",
"createdByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mergedAt": "2023-11-07T05:31:56Z",
"mergedIntoBranchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"fileCount": 123,
"keyCount": 123
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Path Parameters
Body
application/json
Was this page helpful?

