Create or update Databricks Metric View publication settings
curl --request PUT \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"expectedConfigurationVersion": 1,
"targetCatalog": "<string>",
"targetSchema": "<string>",
"sourceOverrides": {},
"targetNamePrefix": "<string>",
"targetNames": {},
"viewNameRegex": "<string>",
"viewNames": [
"<string>"
]
}
'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}"
payload = {
"enabled": True,
"expectedConfigurationVersion": 1,
"targetCatalog": "<string>",
"targetSchema": "<string>",
"sourceOverrides": {},
"targetNamePrefix": "<string>",
"targetNames": {},
"viewNameRegex": "<string>",
"viewNames": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
expectedConfigurationVersion: 1,
targetCatalog: '<string>',
targetSchema: '<string>',
sourceOverrides: {},
targetNamePrefix: '<string>',
targetNames: {},
viewNameRegex: '<string>',
viewNames: ['<string>']
})
};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}', 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/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'expectedConfigurationVersion' => 1,
'targetCatalog' => '<string>',
'targetSchema' => '<string>',
'sourceOverrides' => [
],
'targetNamePrefix' => '<string>',
'targetNames' => [
],
'viewNameRegex' => '<string>',
'viewNames' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"expectedConfigurationVersion\": 1,\n \"targetCatalog\": \"<string>\",\n \"targetSchema\": \"<string>\",\n \"sourceOverrides\": {},\n \"targetNamePrefix\": \"<string>\",\n \"targetNames\": {},\n \"viewNameRegex\": \"<string>\",\n \"viewNames\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.put("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"expectedConfigurationVersion\": 1,\n \"targetCatalog\": \"<string>\",\n \"targetSchema\": \"<string>\",\n \"sourceOverrides\": {},\n \"targetNamePrefix\": \"<string>\",\n \"targetNames\": {},\n \"viewNameRegex\": \"<string>\",\n \"viewNames\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"expectedConfigurationVersion\": 1,\n \"targetCatalog\": \"<string>\",\n \"targetSchema\": \"<string>\",\n \"sourceOverrides\": {},\n \"targetNamePrefix\": \"<string>\",\n \"targetNames\": {},\n \"viewNameRegex\": \"<string>\",\n \"viewNames\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"configuration": {
"deletionPolicy": "retain",
"enabled": true,
"selectionMode": "all",
"targetCatalog": "<string>",
"targetSchema": "<string>",
"version": 1,
"sourceOverrides": {},
"targetNamePrefix": "<string>",
"targetNames": {},
"viewNameRegex": "<string>",
"viewNames": [
"<string>"
]
},
"configurationVersion": 123,
"createdAt": "2023-12-25",
"dataSourceName": "<string>",
"deploymentId": 123,
"publicId": "<string>",
"updatedAt": "2023-12-25",
"accessTest": {}
}Databricks Metric View Integration
Create or update Databricks Metric View publication settings
PUT
/
api
/
v1
/
deployments
/
{deploymentId}
/
databricks-metric-view-integrations
/
{dataSourceName}
Create or update Databricks Metric View publication settings
curl --request PUT \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"expectedConfigurationVersion": 1,
"targetCatalog": "<string>",
"targetSchema": "<string>",
"sourceOverrides": {},
"targetNamePrefix": "<string>",
"targetNames": {},
"viewNameRegex": "<string>",
"viewNames": [
"<string>"
]
}
'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}"
payload = {
"enabled": True,
"expectedConfigurationVersion": 1,
"targetCatalog": "<string>",
"targetSchema": "<string>",
"sourceOverrides": {},
"targetNamePrefix": "<string>",
"targetNames": {},
"viewNameRegex": "<string>",
"viewNames": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
expectedConfigurationVersion: 1,
targetCatalog: '<string>',
targetSchema: '<string>',
sourceOverrides: {},
targetNamePrefix: '<string>',
targetNames: {},
viewNameRegex: '<string>',
viewNames: ['<string>']
})
};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}', 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/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'expectedConfigurationVersion' => 1,
'targetCatalog' => '<string>',
'targetSchema' => '<string>',
'sourceOverrides' => [
],
'targetNamePrefix' => '<string>',
'targetNames' => [
],
'viewNameRegex' => '<string>',
'viewNames' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"expectedConfigurationVersion\": 1,\n \"targetCatalog\": \"<string>\",\n \"targetSchema\": \"<string>\",\n \"sourceOverrides\": {},\n \"targetNamePrefix\": \"<string>\",\n \"targetNames\": {},\n \"viewNameRegex\": \"<string>\",\n \"viewNames\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.put("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"expectedConfigurationVersion\": 1,\n \"targetCatalog\": \"<string>\",\n \"targetSchema\": \"<string>\",\n \"sourceOverrides\": {},\n \"targetNamePrefix\": \"<string>\",\n \"targetNames\": {},\n \"viewNameRegex\": \"<string>\",\n \"viewNames\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/databricks-metric-view-integrations/{dataSourceName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"expectedConfigurationVersion\": 1,\n \"targetCatalog\": \"<string>\",\n \"targetSchema\": \"<string>\",\n \"sourceOverrides\": {},\n \"targetNamePrefix\": \"<string>\",\n \"targetNames\": {},\n \"viewNameRegex\": \"<string>\",\n \"viewNames\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"configuration": {
"deletionPolicy": "retain",
"enabled": true,
"selectionMode": "all",
"targetCatalog": "<string>",
"targetSchema": "<string>",
"version": 1,
"sourceOverrides": {},
"targetNamePrefix": "<string>",
"targetNames": {},
"viewNameRegex": "<string>",
"viewNames": [
"<string>"
]
},
"configurationVersion": 123,
"createdAt": "2023-12-25",
"dataSourceName": "<string>",
"deploymentId": 123,
"publicId": "<string>",
"updatedAt": "2023-12-25",
"accessTest": {}
}Uses optimistic configuration versioning. Pass
expectedConfigurationVersion 0 to create. Requires a Databricks datasource. This is currently in preview — reach out to the Cube support team to activate it for your account.Authorizations
Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.
Body
application/json
SaveDatabricksMetricViewIntegrationInput
Use 0 to create; otherwise pass the configurationVersion returned by GET.
Required range:
x >= 0Available options:
all, selected, pattern Maximum string length:
255Maximum string length:
255Available options:
retain, delete-managed Show child attributes
Show child attributes
Maximum string length:
255Show child attributes
Show child attributes
Maximum string length:
128Maximum array length:
128Response
200 - application/json