(deprecated since 23.1)Update only specific properties (name, description, enabled) of a Materialized view.
curl --request PATCH \
--url http://10.2.4.166:8080/composer/api/materialized-views/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--data '
{
"name": "<string>",
"description": "<string>",
"enabled": true
}
'import requests
url = "http://10.2.4.166:8080/composer/api/materialized-views/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"enabled": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({name: '<string>', description: '<string>', enabled: true})
};
fetch('http://10.2.4.166:8080/composer/api/materialized-views/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://10.2.4.166:8080/composer/api/materialized-views/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/vnd.composer.v3+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 := "http://10.2.4.166:8080/composer/api/materialized-views/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/vnd.composer.v3+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://10.2.4.166:8080/composer/api/materialized-views/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/materialized-views/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"description": "<string>",
"enabled": true,
"definition": {
"type": "AGG",
"filters": [
{
"path": {
"name": "<string>"
},
"operation": "EQUALS",
"value": "<unknown>"
}
],
"sourceId": "<string>",
"aggregations": [
{
"type": "TERMS",
"field": {
"name": "<string>"
}
}
],
"metrics": [
{
"type": "COUNT",
"rollup": true,
"formulaName": "<string>",
"formula": "<string>"
}
]
},
"storageSettings": {
"targetStorage": {
"connectionId": "<string>",
"schemas": [
"<string>"
],
"collection": "<string>",
"collectionParams": {}
},
"fieldMappings": [
{
"targetFieldName": "<string>",
"sourceFieldName": "<string>",
"sourceMetric": {
"type": "COUNT",
"rollup": true,
"formulaName": "<string>",
"formula": "<string>"
},
"sourceAggregation": {
"type": "TERMS",
"field": {
"name": "<string>"
}
}
}
]
},
"id": "<string>",
"referencedSourceIds": [
"<string>"
],
"definitionQuery": "<string>"
}(deprecated since 23.1)Update only specific properties (name, description, enabled) of a Materialized view.
deprecated
(deprecated since 23.1)Update only specific properties (name, description, enabled) of a Materialized view.
curl --request PATCH \
--url http://10.2.4.166:8080/composer/api/materialized-views/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--data '
{
"name": "<string>",
"description": "<string>",
"enabled": true
}
'import requests
url = "http://10.2.4.166:8080/composer/api/materialized-views/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"enabled": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({name: '<string>', description: '<string>', enabled: true})
};
fetch('http://10.2.4.166:8080/composer/api/materialized-views/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://10.2.4.166:8080/composer/api/materialized-views/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/vnd.composer.v3+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 := "http://10.2.4.166:8080/composer/api/materialized-views/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/vnd.composer.v3+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://10.2.4.166:8080/composer/api/materialized-views/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/materialized-views/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"description": "<string>",
"enabled": true,
"definition": {
"type": "AGG",
"filters": [
{
"path": {
"name": "<string>"
},
"operation": "EQUALS",
"value": "<unknown>"
}
],
"sourceId": "<string>",
"aggregations": [
{
"type": "TERMS",
"field": {
"name": "<string>"
}
}
],
"metrics": [
{
"type": "COUNT",
"rollup": true,
"formulaName": "<string>",
"formula": "<string>"
}
]
},
"storageSettings": {
"targetStorage": {
"connectionId": "<string>",
"schemas": [
"<string>"
],
"collection": "<string>",
"collectionParams": {}
},
"fieldMappings": [
{
"targetFieldName": "<string>",
"sourceFieldName": "<string>",
"sourceMetric": {
"type": "COUNT",
"rollup": true,
"formulaName": "<string>",
"formula": "<string>"
},
"sourceAggregation": {
"type": "TERMS",
"field": {
"name": "<string>"
}
}
}
]
},
"id": "<string>",
"referencedSourceIds": [
"<string>"
],
"definitionQuery": "<string>"
}Authorizations
HTTP Basic authentication using global administrator credentials (username and password).
Path Parameters
Body
application/vnd.composer.v3+json
Response
200 - application/vnd.composer.v3+json
OK
Materialized View
Structure that defines the data stored in a Materialized View.
- Option 1
- Option 2
Show child attributes
Show child attributes
Storage settings for Materialized View, required to use external data storage. If not specified, data will be automatically stored internally.
Show child attributes
Show child attributes
Sources that can be matched by this Materialized View.
SQL query that defines this Materialized View.
Was this page helpful?