Create Visual Type
curl --request POST \
--url http://10.2.4.166:8080/composer/api/visual-types \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--data '
{
"id": "<string>",
"templateId": "<string>",
"templateType": "<string>",
"name": "<string>",
"accountId": "<string>",
"enabled": true,
"type": "<string>",
"internalComponent": "ListFilterWidget",
"components": [
{
"name": "<string>",
"id": "<string>",
"visualTypeId": "<string>",
"body": "<string>",
"type": "<string>",
"order": 123,
"uploadDate": "2023-11-07T05:31:56Z",
"path": "<string>"
}
],
"objectFieldTypes": [
"<string>"
],
"controls": [
"<string>"
],
"thumbnailId": "<string>",
"variables": [
{
"id": "<string>",
"visualTypeId": "<string>",
"name": "<string>",
"type": "<string>",
"descr": "<string>",
"attributeType": [
"<string>"
],
"values": [
"<string>"
],
"defaultValue": "<unknown>",
"colorMetric": true,
"colorNumb": 123,
"metricType": "<string>",
"legendType": "<string>",
"colors": "<unknown>",
"colorSet": "<string>",
"config": "<unknown>",
"groupType": "<string>",
"timeAttribute": "<string>",
"timeScale": "<string>",
"hidden": true,
"required": true
}
],
"schemas": {},
"wrap": true,
"jsBundleChunks": [
"<string>"
]
}
'import requests
url = "http://10.2.4.166:8080/composer/api/visual-types"
payload = {
"id": "<string>",
"templateId": "<string>",
"templateType": "<string>",
"name": "<string>",
"accountId": "<string>",
"enabled": True,
"type": "<string>",
"internalComponent": "ListFilterWidget",
"components": [
{
"name": "<string>",
"id": "<string>",
"visualTypeId": "<string>",
"body": "<string>",
"type": "<string>",
"order": 123,
"uploadDate": "2023-11-07T05:31:56Z",
"path": "<string>"
}
],
"objectFieldTypes": ["<string>"],
"controls": ["<string>"],
"thumbnailId": "<string>",
"variables": [
{
"id": "<string>",
"visualTypeId": "<string>",
"name": "<string>",
"type": "<string>",
"descr": "<string>",
"attributeType": ["<string>"],
"values": ["<string>"],
"defaultValue": "<unknown>",
"colorMetric": True,
"colorNumb": 123,
"metricType": "<string>",
"legendType": "<string>",
"colors": "<unknown>",
"colorSet": "<string>",
"config": "<unknown>",
"groupType": "<string>",
"timeAttribute": "<string>",
"timeScale": "<string>",
"hidden": True,
"required": True
}
],
"schemas": {},
"wrap": True,
"jsBundleChunks": ["<string>"]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({
id: '<string>',
templateId: '<string>',
templateType: '<string>',
name: '<string>',
accountId: '<string>',
enabled: true,
type: '<string>',
internalComponent: 'ListFilterWidget',
components: [
{
name: '<string>',
id: '<string>',
visualTypeId: '<string>',
body: JSON.stringify('<string>'),
type: '<string>',
order: 123,
uploadDate: '2023-11-07T05:31:56Z',
path: '<string>'
}
],
objectFieldTypes: ['<string>'],
controls: ['<string>'],
thumbnailId: '<string>',
variables: [
{
id: '<string>',
visualTypeId: '<string>',
name: '<string>',
type: '<string>',
descr: '<string>',
attributeType: ['<string>'],
values: ['<string>'],
defaultValue: '<unknown>',
colorMetric: true,
colorNumb: 123,
metricType: '<string>',
legendType: '<string>',
colors: '<unknown>',
colorSet: '<string>',
config: '<unknown>',
groupType: '<string>',
timeAttribute: '<string>',
timeScale: '<string>',
hidden: true,
required: true
}
],
schemas: {},
wrap: true,
jsBundleChunks: ['<string>']
})
};
fetch('http://10.2.4.166:8080/composer/api/visual-types', 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/visual-types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'templateId' => '<string>',
'templateType' => '<string>',
'name' => '<string>',
'accountId' => '<string>',
'enabled' => true,
'type' => '<string>',
'internalComponent' => 'ListFilterWidget',
'components' => [
[
'name' => '<string>',
'id' => '<string>',
'visualTypeId' => '<string>',
'body' => '<string>',
'type' => '<string>',
'order' => 123,
'uploadDate' => '2023-11-07T05:31:56Z',
'path' => '<string>'
]
],
'objectFieldTypes' => [
'<string>'
],
'controls' => [
'<string>'
],
'thumbnailId' => '<string>',
'variables' => [
[
'id' => '<string>',
'visualTypeId' => '<string>',
'name' => '<string>',
'type' => '<string>',
'descr' => '<string>',
'attributeType' => [
'<string>'
],
'values' => [
'<string>'
],
'defaultValue' => '<unknown>',
'colorMetric' => true,
'colorNumb' => 123,
'metricType' => '<string>',
'legendType' => '<string>',
'colors' => '<unknown>',
'colorSet' => '<string>',
'config' => '<unknown>',
'groupType' => '<string>',
'timeAttribute' => '<string>',
'timeScale' => '<string>',
'hidden' => true,
'required' => true
]
],
'schemas' => [
],
'wrap' => true,
'jsBundleChunks' => [
'<string>'
]
]),
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/visual-types"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"templateId\": \"<string>\",\n \"templateType\": \"<string>\",\n \"name\": \"<string>\",\n \"accountId\": \"<string>\",\n \"enabled\": true,\n \"type\": \"<string>\",\n \"internalComponent\": \"ListFilterWidget\",\n \"components\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"uploadDate\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\"\n }\n ],\n \"objectFieldTypes\": [\n \"<string>\"\n ],\n \"controls\": [\n \"<string>\"\n ],\n \"thumbnailId\": \"<string>\",\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"descr\": \"<string>\",\n \"attributeType\": [\n \"<string>\"\n ],\n \"values\": [\n \"<string>\"\n ],\n \"defaultValue\": \"<unknown>\",\n \"colorMetric\": true,\n \"colorNumb\": 123,\n \"metricType\": \"<string>\",\n \"legendType\": \"<string>\",\n \"colors\": \"<unknown>\",\n \"colorSet\": \"<string>\",\n \"config\": \"<unknown>\",\n \"groupType\": \"<string>\",\n \"timeAttribute\": \"<string>\",\n \"timeScale\": \"<string>\",\n \"hidden\": true,\n \"required\": true\n }\n ],\n \"schemas\": {},\n \"wrap\": true,\n \"jsBundleChunks\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("http://10.2.4.166:8080/composer/api/visual-types")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"id\": \"<string>\",\n \"templateId\": \"<string>\",\n \"templateType\": \"<string>\",\n \"name\": \"<string>\",\n \"accountId\": \"<string>\",\n \"enabled\": true,\n \"type\": \"<string>\",\n \"internalComponent\": \"ListFilterWidget\",\n \"components\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"uploadDate\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\"\n }\n ],\n \"objectFieldTypes\": [\n \"<string>\"\n ],\n \"controls\": [\n \"<string>\"\n ],\n \"thumbnailId\": \"<string>\",\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"descr\": \"<string>\",\n \"attributeType\": [\n \"<string>\"\n ],\n \"values\": [\n \"<string>\"\n ],\n \"defaultValue\": \"<unknown>\",\n \"colorMetric\": true,\n \"colorNumb\": 123,\n \"metricType\": \"<string>\",\n \"legendType\": \"<string>\",\n \"colors\": \"<unknown>\",\n \"colorSet\": \"<string>\",\n \"config\": \"<unknown>\",\n \"groupType\": \"<string>\",\n \"timeAttribute\": \"<string>\",\n \"timeScale\": \"<string>\",\n \"hidden\": true,\n \"required\": true\n }\n ],\n \"schemas\": {},\n \"wrap\": true,\n \"jsBundleChunks\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/visual-types")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"id\": \"<string>\",\n \"templateId\": \"<string>\",\n \"templateType\": \"<string>\",\n \"name\": \"<string>\",\n \"accountId\": \"<string>\",\n \"enabled\": true,\n \"type\": \"<string>\",\n \"internalComponent\": \"ListFilterWidget\",\n \"components\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"uploadDate\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\"\n }\n ],\n \"objectFieldTypes\": [\n \"<string>\"\n ],\n \"controls\": [\n \"<string>\"\n ],\n \"thumbnailId\": \"<string>\",\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"descr\": \"<string>\",\n \"attributeType\": [\n \"<string>\"\n ],\n \"values\": [\n \"<string>\"\n ],\n \"defaultValue\": \"<unknown>\",\n \"colorMetric\": true,\n \"colorNumb\": 123,\n \"metricType\": \"<string>\",\n \"legendType\": \"<string>\",\n \"colors\": \"<unknown>\",\n \"colorSet\": \"<string>\",\n \"config\": \"<unknown>\",\n \"groupType\": \"<string>\",\n \"timeAttribute\": \"<string>\",\n \"timeScale\": \"<string>\",\n \"hidden\": true,\n \"required\": true\n }\n ],\n \"schemas\": {},\n \"wrap\": true,\n \"jsBundleChunks\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"templateId": "<string>",
"templateType": "<string>",
"name": "<string>",
"accountId": "<string>",
"enabled": true,
"type": "<string>",
"internalComponent": "ListFilterWidget",
"components": [
{
"name": "<string>",
"id": "<string>",
"visualTypeId": "<string>",
"body": "<string>",
"type": "<string>",
"order": 123,
"uploadDate": "2023-11-07T05:31:56Z",
"path": "<string>"
}
],
"objectFieldTypes": [
"<string>"
],
"controls": [
"<string>"
],
"thumbnailId": "<string>",
"variables": [
{
"id": "<string>",
"visualTypeId": "<string>",
"name": "<string>",
"type": "<string>",
"descr": "<string>",
"attributeType": [
"<string>"
],
"values": [
"<string>"
],
"defaultValue": "<unknown>",
"colorMetric": true,
"colorNumb": 123,
"metricType": "<string>",
"legendType": "<string>",
"colors": "<unknown>",
"colorSet": "<string>",
"config": "<unknown>",
"groupType": "<string>",
"timeAttribute": "<string>",
"timeScale": "<string>",
"hidden": true,
"required": true
}
],
"schemas": {},
"wrap": true,
"jsBundleChunks": [
"<string>"
]
}Create Visual Type
Create Visual Type
curl --request POST \
--url http://10.2.4.166:8080/composer/api/visual-types \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--data '
{
"id": "<string>",
"templateId": "<string>",
"templateType": "<string>",
"name": "<string>",
"accountId": "<string>",
"enabled": true,
"type": "<string>",
"internalComponent": "ListFilterWidget",
"components": [
{
"name": "<string>",
"id": "<string>",
"visualTypeId": "<string>",
"body": "<string>",
"type": "<string>",
"order": 123,
"uploadDate": "2023-11-07T05:31:56Z",
"path": "<string>"
}
],
"objectFieldTypes": [
"<string>"
],
"controls": [
"<string>"
],
"thumbnailId": "<string>",
"variables": [
{
"id": "<string>",
"visualTypeId": "<string>",
"name": "<string>",
"type": "<string>",
"descr": "<string>",
"attributeType": [
"<string>"
],
"values": [
"<string>"
],
"defaultValue": "<unknown>",
"colorMetric": true,
"colorNumb": 123,
"metricType": "<string>",
"legendType": "<string>",
"colors": "<unknown>",
"colorSet": "<string>",
"config": "<unknown>",
"groupType": "<string>",
"timeAttribute": "<string>",
"timeScale": "<string>",
"hidden": true,
"required": true
}
],
"schemas": {},
"wrap": true,
"jsBundleChunks": [
"<string>"
]
}
'import requests
url = "http://10.2.4.166:8080/composer/api/visual-types"
payload = {
"id": "<string>",
"templateId": "<string>",
"templateType": "<string>",
"name": "<string>",
"accountId": "<string>",
"enabled": True,
"type": "<string>",
"internalComponent": "ListFilterWidget",
"components": [
{
"name": "<string>",
"id": "<string>",
"visualTypeId": "<string>",
"body": "<string>",
"type": "<string>",
"order": 123,
"uploadDate": "2023-11-07T05:31:56Z",
"path": "<string>"
}
],
"objectFieldTypes": ["<string>"],
"controls": ["<string>"],
"thumbnailId": "<string>",
"variables": [
{
"id": "<string>",
"visualTypeId": "<string>",
"name": "<string>",
"type": "<string>",
"descr": "<string>",
"attributeType": ["<string>"],
"values": ["<string>"],
"defaultValue": "<unknown>",
"colorMetric": True,
"colorNumb": 123,
"metricType": "<string>",
"legendType": "<string>",
"colors": "<unknown>",
"colorSet": "<string>",
"config": "<unknown>",
"groupType": "<string>",
"timeAttribute": "<string>",
"timeScale": "<string>",
"hidden": True,
"required": True
}
],
"schemas": {},
"wrap": True,
"jsBundleChunks": ["<string>"]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({
id: '<string>',
templateId: '<string>',
templateType: '<string>',
name: '<string>',
accountId: '<string>',
enabled: true,
type: '<string>',
internalComponent: 'ListFilterWidget',
components: [
{
name: '<string>',
id: '<string>',
visualTypeId: '<string>',
body: JSON.stringify('<string>'),
type: '<string>',
order: 123,
uploadDate: '2023-11-07T05:31:56Z',
path: '<string>'
}
],
objectFieldTypes: ['<string>'],
controls: ['<string>'],
thumbnailId: '<string>',
variables: [
{
id: '<string>',
visualTypeId: '<string>',
name: '<string>',
type: '<string>',
descr: '<string>',
attributeType: ['<string>'],
values: ['<string>'],
defaultValue: '<unknown>',
colorMetric: true,
colorNumb: 123,
metricType: '<string>',
legendType: '<string>',
colors: '<unknown>',
colorSet: '<string>',
config: '<unknown>',
groupType: '<string>',
timeAttribute: '<string>',
timeScale: '<string>',
hidden: true,
required: true
}
],
schemas: {},
wrap: true,
jsBundleChunks: ['<string>']
})
};
fetch('http://10.2.4.166:8080/composer/api/visual-types', 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/visual-types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'templateId' => '<string>',
'templateType' => '<string>',
'name' => '<string>',
'accountId' => '<string>',
'enabled' => true,
'type' => '<string>',
'internalComponent' => 'ListFilterWidget',
'components' => [
[
'name' => '<string>',
'id' => '<string>',
'visualTypeId' => '<string>',
'body' => '<string>',
'type' => '<string>',
'order' => 123,
'uploadDate' => '2023-11-07T05:31:56Z',
'path' => '<string>'
]
],
'objectFieldTypes' => [
'<string>'
],
'controls' => [
'<string>'
],
'thumbnailId' => '<string>',
'variables' => [
[
'id' => '<string>',
'visualTypeId' => '<string>',
'name' => '<string>',
'type' => '<string>',
'descr' => '<string>',
'attributeType' => [
'<string>'
],
'values' => [
'<string>'
],
'defaultValue' => '<unknown>',
'colorMetric' => true,
'colorNumb' => 123,
'metricType' => '<string>',
'legendType' => '<string>',
'colors' => '<unknown>',
'colorSet' => '<string>',
'config' => '<unknown>',
'groupType' => '<string>',
'timeAttribute' => '<string>',
'timeScale' => '<string>',
'hidden' => true,
'required' => true
]
],
'schemas' => [
],
'wrap' => true,
'jsBundleChunks' => [
'<string>'
]
]),
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/visual-types"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"templateId\": \"<string>\",\n \"templateType\": \"<string>\",\n \"name\": \"<string>\",\n \"accountId\": \"<string>\",\n \"enabled\": true,\n \"type\": \"<string>\",\n \"internalComponent\": \"ListFilterWidget\",\n \"components\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"uploadDate\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\"\n }\n ],\n \"objectFieldTypes\": [\n \"<string>\"\n ],\n \"controls\": [\n \"<string>\"\n ],\n \"thumbnailId\": \"<string>\",\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"descr\": \"<string>\",\n \"attributeType\": [\n \"<string>\"\n ],\n \"values\": [\n \"<string>\"\n ],\n \"defaultValue\": \"<unknown>\",\n \"colorMetric\": true,\n \"colorNumb\": 123,\n \"metricType\": \"<string>\",\n \"legendType\": \"<string>\",\n \"colors\": \"<unknown>\",\n \"colorSet\": \"<string>\",\n \"config\": \"<unknown>\",\n \"groupType\": \"<string>\",\n \"timeAttribute\": \"<string>\",\n \"timeScale\": \"<string>\",\n \"hidden\": true,\n \"required\": true\n }\n ],\n \"schemas\": {},\n \"wrap\": true,\n \"jsBundleChunks\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("http://10.2.4.166:8080/composer/api/visual-types")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"id\": \"<string>\",\n \"templateId\": \"<string>\",\n \"templateType\": \"<string>\",\n \"name\": \"<string>\",\n \"accountId\": \"<string>\",\n \"enabled\": true,\n \"type\": \"<string>\",\n \"internalComponent\": \"ListFilterWidget\",\n \"components\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"uploadDate\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\"\n }\n ],\n \"objectFieldTypes\": [\n \"<string>\"\n ],\n \"controls\": [\n \"<string>\"\n ],\n \"thumbnailId\": \"<string>\",\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"descr\": \"<string>\",\n \"attributeType\": [\n \"<string>\"\n ],\n \"values\": [\n \"<string>\"\n ],\n \"defaultValue\": \"<unknown>\",\n \"colorMetric\": true,\n \"colorNumb\": 123,\n \"metricType\": \"<string>\",\n \"legendType\": \"<string>\",\n \"colors\": \"<unknown>\",\n \"colorSet\": \"<string>\",\n \"config\": \"<unknown>\",\n \"groupType\": \"<string>\",\n \"timeAttribute\": \"<string>\",\n \"timeScale\": \"<string>\",\n \"hidden\": true,\n \"required\": true\n }\n ],\n \"schemas\": {},\n \"wrap\": true,\n \"jsBundleChunks\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/visual-types")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"id\": \"<string>\",\n \"templateId\": \"<string>\",\n \"templateType\": \"<string>\",\n \"name\": \"<string>\",\n \"accountId\": \"<string>\",\n \"enabled\": true,\n \"type\": \"<string>\",\n \"internalComponent\": \"ListFilterWidget\",\n \"components\": [\n {\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"body\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"uploadDate\": \"2023-11-07T05:31:56Z\",\n \"path\": \"<string>\"\n }\n ],\n \"objectFieldTypes\": [\n \"<string>\"\n ],\n \"controls\": [\n \"<string>\"\n ],\n \"thumbnailId\": \"<string>\",\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"visualTypeId\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"descr\": \"<string>\",\n \"attributeType\": [\n \"<string>\"\n ],\n \"values\": [\n \"<string>\"\n ],\n \"defaultValue\": \"<unknown>\",\n \"colorMetric\": true,\n \"colorNumb\": 123,\n \"metricType\": \"<string>\",\n \"legendType\": \"<string>\",\n \"colors\": \"<unknown>\",\n \"colorSet\": \"<string>\",\n \"config\": \"<unknown>\",\n \"groupType\": \"<string>\",\n \"timeAttribute\": \"<string>\",\n \"timeScale\": \"<string>\",\n \"hidden\": true,\n \"required\": true\n }\n ],\n \"schemas\": {},\n \"wrap\": true,\n \"jsBundleChunks\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"templateId": "<string>",
"templateType": "<string>",
"name": "<string>",
"accountId": "<string>",
"enabled": true,
"type": "<string>",
"internalComponent": "ListFilterWidget",
"components": [
{
"name": "<string>",
"id": "<string>",
"visualTypeId": "<string>",
"body": "<string>",
"type": "<string>",
"order": 123,
"uploadDate": "2023-11-07T05:31:56Z",
"path": "<string>"
}
],
"objectFieldTypes": [
"<string>"
],
"controls": [
"<string>"
],
"thumbnailId": "<string>",
"variables": [
{
"id": "<string>",
"visualTypeId": "<string>",
"name": "<string>",
"type": "<string>",
"descr": "<string>",
"attributeType": [
"<string>"
],
"values": [
"<string>"
],
"defaultValue": "<unknown>",
"colorMetric": true,
"colorNumb": 123,
"metricType": "<string>",
"legendType": "<string>",
"colors": "<unknown>",
"colorSet": "<string>",
"config": "<unknown>",
"groupType": "<string>",
"timeAttribute": "<string>",
"timeScale": "<string>",
"hidden": true,
"required": true
}
],
"schemas": {},
"wrap": true,
"jsBundleChunks": [
"<string>"
]
}Authorizations
HTTP Basic authentication using global administrator credentials (username and password).
Body
application/vnd.composer.v3+json
VisualType object represents a definition of a visual type in the application. It does not contain source-specific settings.
Indicates if UI needs to render visual type in a special way
Example:
"ListFilterWidget"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
200 - application/vnd.composer.v3+json
OK
VisualType object represents a definition of a visual type in the application. It does not contain source-specific settings.
Indicates if UI needs to render visual type in a special way
Example:
"ListFilterWidget"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?