Show what data-model git commits on a branch changed (git diff of commits)
curl --request GET \
--url https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"branchName": "<string>",
"deletions": 123,
"diff": "<string>",
"diffTruncated": true,
"files": [
{
"path": "<string>",
"status": "<string>",
"binary": true,
"deletions": 123,
"insertions": 123,
"previousPath": "<string>"
}
],
"fromCommit": "<string>",
"insertions": 123,
"toCommit": "<string>",
"diffOmittedReason": "<string>",
"totalFiles": 123
}Data Model History
Show what data-model git commits on a branch changed (git diff of commits)
GET
/
build
/
api
/
v1
/
deployments
/
{deploymentId}
/
data-model
/
commit-diff
Show what data-model git commits on a branch changed (git diff of commits)
curl --request GET \
--url https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/build/api/v1/deployments/{deploymentId}/data-model/commit-diff")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"branchName": "<string>",
"deletions": 123,
"diff": "<string>",
"diffTruncated": true,
"files": [
{
"path": "<string>",
"status": "<string>",
"binary": true,
"deletions": 123,
"insertions": 123,
"previousPath": "<string>"
}
],
"fromCommit": "<string>",
"insertions": 123,
"toCommit": "<string>",
"diffOmittedReason": "<string>",
"totalFiles": 123
}toCommit alone diffs that commit against its first parent, fromCommit and toCommit diff the range, and fromCommit alone diffs it against the branch tip. Both must be in the branch’s history.