Import Visual Type
curl --request POST \
--url http://10.2.4.166:8080/composer/api/visual-types/import \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: multipart/form-data' \
--data-binary $'<string>'import requests
url = "http://10.2.4.166:8080/composer/api/visual-types/import"
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'multipart/form-data'}
};
fetch('http://10.2.4.166:8080/composer/api/visual-types/import', 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/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: multipart/form-data"
],
]);
$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/import"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "multipart/form-data")
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/import")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "multipart/form-data")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/visual-types/import")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'multipart/form-data'
request.body = "<string>"
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>"
]
}Import Visual Type
Import Visual Type
curl --request POST \
--url http://10.2.4.166:8080/composer/api/visual-types/import \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: multipart/form-data' \
--data-binary $'<string>'import requests
url = "http://10.2.4.166:8080/composer/api/visual-types/import"
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'multipart/form-data'}
};
fetch('http://10.2.4.166:8080/composer/api/visual-types/import', 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/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: multipart/form-data"
],
]);
$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/import"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "multipart/form-data")
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/import")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "multipart/form-data")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/visual-types/import")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'multipart/form-data'
request.body = "<string>"
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
multipart/form-data
visName
Response
201 - application/vnd.composer.v3+json
Created
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?