Preview a branch merge
curl --request GET \
--url https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge-preview \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge-preview', 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-preview"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge-preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"changes": [
{
"kind": "added",
"sourcePath": "<string>",
"key": "<string>",
"sourceText": "<string>",
"targetSourceText": "<string>",
"translations": [
{
"locale": "<string>",
"text": "<string>",
"status": "<string>"
}
]
}
]
}{
"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
Preview a branch merge
Requires projects:read. Native projects only. Lists the strings a merge would write onto targetName, or onto the branch’s parent when targetName is omitted. kind is added (only on this branch), changed (translations differ) or conflicted (source text differs, settled by the merge’s strategy).
GET
https://public-api.hyperlocalise.com
/
v1
/
projects
/
{projectId}
/
branches
/
{branchName}
/
merge-preview
Preview a branch merge
curl --request GET \
--url https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge-preview \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge-preview', 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-preview"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.hyperlocalise.com/v1/projects/{projectId}/branches/{branchName}/merge-preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"changes": [
{
"kind": "added",
"sourcePath": "<string>",
"key": "<string>",
"sourceText": "<string>",
"targetSourceText": "<string>",
"translations": [
{
"locale": "<string>",
"text": "<string>",
"status": "<string>"
}
]
}
]
}{
"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
Was this page helpful?

