curl --request PUT \
--url http://10.2.4.166:8080/composer/api/sources/{sourceId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--data '
{
"name": "Source Name",
"description": "<string>",
"tags": [
"<string>"
],
"folderId": 1111,
"positionConfiguration": {}
}
'import requests
url = "http://10.2.4.166:8080/composer/api/sources/{sourceId}"
payload = {
"name": "Source Name",
"description": "<string>",
"tags": ["<string>"],
"folderId": 1111,
"positionConfiguration": {}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({
name: 'Source Name',
description: '<string>',
tags: ['<string>'],
folderId: 1111,
positionConfiguration: {}
})
};
fetch('http://10.2.4.166:8080/composer/api/sources/{sourceId}', 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/sources/{sourceId}",
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([
'name' => 'Source Name',
'description' => '<string>',
'tags' => [
'<string>'
],
'folderId' => 1111,
'positionConfiguration' => [
]
]),
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/sources/{sourceId}"
payload := strings.NewReader("{\n \"name\": \"Source Name\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"folderId\": 1111,\n \"positionConfiguration\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("http://10.2.4.166:8080/composer/api/sources/{sourceId}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"name\": \"Source Name\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"folderId\": 1111,\n \"positionConfiguration\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/sources/{sourceId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"name\": \"Source Name\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"folderId\": 1111,\n \"positionConfiguration\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "Source Name",
"id": "59ba04795b542f60838ce0ea",
"description": "<string>",
"auditable": {
"createdByUserId": "59ba04795b542f60838ce0e1",
"createdByUserName": "user_name",
"createdDate": "2023-11-07T05:31:56Z",
"lastModifiedByUserId": "59ba04795b542f60838ce0e2",
"lastModifiedDate": "2023-11-07T05:31:56Z"
},
"storage": {
"dataEntities": [
{
"type": "SINGLE_COLLECTION",
"id": "data_entity_id",
"name": "Data Entity name",
"singleCollection": {
"connectionId": "59ba04795b542f60838ce0eb",
"collection": "real_time_sales",
"schema": "public",
"parameters": {}
},
"customSql": {
"connectionId": "59ba04795b542f60838ce0eb",
"sql": "select price * 100 as price, product_id from products"
},
"index": {
"connectionId": "59ba04795b542f60838ce0eb",
"collections": [
"log-1",
"log-2",
"log-3"
],
"patternType": "NATIVE",
"pattern": "log-*"
},
"upload": {
"uploadId": "59ba04795b542f60838ce0ec"
},
"nativeFields": [
{
"origin": {
"type": "NATIVE",
"nativeOrigin": {
"originalName": "field_name",
"originalType": "TIME",
"dataEntityId": "data_entity_1",
"rawFormat": {},
"metaFlags": [
"PLAYABLE"
],
"partitionedBy": {
"field": "<string>",
"function": "MURMUR3_HASH"
}
},
"derivedOrigin": {
"expression": "sales * 100",
"calendarId": "<string>",
"referencedFieldNames": [
"<string>"
]
},
"hierarchyOrigin": {
"childParent": {
"childField": "<string>",
"parentField": "<string>"
},
"labelField": "<string>"
}
},
"name": "field_name",
"label": "Field Label",
"visible": true,
"defaultMetric": "avg",
"dataType": "ATTRIBUTE",
"format": {
"time": {
"granularity": "MILLISECOND",
"timeZone": "UTC",
"options": {
"second": "NUMERIC",
"minute": "NUMERIC",
"hour": "NUMERIC",
"day": "NUMERIC",
"weekday": "LONG",
"week": "TWO_DIGIT",
"month": "NUMERIC",
"quarter": "TWO_DIGIT",
"year": "NUMERIC",
"dayOfYear": "NUMERIC",
"hour12": true
}
},
"number": {
"type": "PLAIN",
"decimals": 2,
"separator": true,
"negative": "SIGNED",
"standardUnit": "NONE",
"storageUnit": "BYTES",
"currencyCode": "USD"
},
"url": {
"type": "LINK",
"src": "<string>",
"width": 123,
"height": 123
}
},
"statistics": {
"override": {
"min": 123,
"max": 123,
"distinctValues": [
"<unknown>"
]
},
"cacheEnabled": true,
"refreshable": true,
"lookup": {
"raw": {
"dataEntityId": "<string>",
"originalFieldName": "<string>"
}
},
"cardinality": 123
},
"facetFiltering": {
"enabled": true,
"order": 2
},
"granularity": "MILLISECOND",
"disabledCapabilities": [
"<string>"
],
"fieldMetadata": {},
"rawFormatSupportTimeGroup": true,
"fieldName": "<string>",
"originalFieldName": "<string>"
}
],
"forbiddenFeatures": [
"<string>"
],
"auxiliary": true,
"cacheSettings": {
"rawCacheEnabled": true,
"rawCacheTtl": 2
}
}
],
"joins": [
{
"type": "INNER",
"leftDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"rightDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"conditions": [
{
"leftFieldName": "left_field_name",
"rightFieldName": "right_field_name"
}
]
}
]
},
"tags": [
"<string>"
],
"originId": "<string>",
"scope": "ACCOUNT",
"workspaceId": "<string>",
"projectId": 2222,
"folderId": 1111,
"positionConfiguration": {}
}{
"name": "Source Name",
"id": "59ba04795b542f60838ce0ea",
"description": "<string>",
"auditable": {
"createdByUserId": "59ba04795b542f60838ce0e1",
"createdByUserName": "user_name",
"createdDate": "2023-11-07T05:31:56Z",
"lastModifiedByUserId": "59ba04795b542f60838ce0e2",
"lastModifiedDate": "2023-11-07T05:31:56Z"
},
"storage": {
"dataEntities": [
{
"type": "SINGLE_COLLECTION",
"id": "data_entity_id",
"name": "Data Entity name",
"singleCollection": {
"connectionId": "59ba04795b542f60838ce0eb",
"collection": "real_time_sales",
"schema": "public",
"parameters": {}
},
"customSql": {
"connectionId": "59ba04795b542f60838ce0eb",
"sql": "select price * 100 as price, product_id from products"
},
"index": {
"connectionId": "59ba04795b542f60838ce0eb",
"collections": [
"log-1",
"log-2",
"log-3"
],
"patternType": "NATIVE",
"pattern": "log-*"
},
"upload": {
"uploadId": "59ba04795b542f60838ce0ec"
},
"nativeFields": [
{
"origin": {
"type": "NATIVE",
"nativeOrigin": {
"originalName": "field_name",
"originalType": "TIME",
"dataEntityId": "data_entity_1",
"rawFormat": {},
"metaFlags": [
"PLAYABLE"
],
"partitionedBy": {
"field": "<string>",
"function": "MURMUR3_HASH"
}
},
"derivedOrigin": {
"expression": "sales * 100",
"calendarId": "<string>",
"referencedFieldNames": [
"<string>"
]
},
"hierarchyOrigin": {
"childParent": {
"childField": "<string>",
"parentField": "<string>"
},
"labelField": "<string>"
}
},
"name": "field_name",
"label": "Field Label",
"visible": true,
"defaultMetric": "avg",
"dataType": "ATTRIBUTE",
"format": {
"time": {
"granularity": "MILLISECOND",
"timeZone": "UTC",
"options": {
"second": "NUMERIC",
"minute": "NUMERIC",
"hour": "NUMERIC",
"day": "NUMERIC",
"weekday": "LONG",
"week": "TWO_DIGIT",
"month": "NUMERIC",
"quarter": "TWO_DIGIT",
"year": "NUMERIC",
"dayOfYear": "NUMERIC",
"hour12": true
}
},
"number": {
"type": "PLAIN",
"decimals": 2,
"separator": true,
"negative": "SIGNED",
"standardUnit": "NONE",
"storageUnit": "BYTES",
"currencyCode": "USD"
},
"url": {
"type": "LINK",
"src": "<string>",
"width": 123,
"height": 123
}
},
"statistics": {
"override": {
"min": 123,
"max": 123,
"distinctValues": [
"<unknown>"
]
},
"cacheEnabled": true,
"refreshable": true,
"lookup": {
"raw": {
"dataEntityId": "<string>",
"originalFieldName": "<string>"
}
},
"cardinality": 123
},
"facetFiltering": {
"enabled": true,
"order": 2
},
"granularity": "MILLISECOND",
"disabledCapabilities": [
"<string>"
],
"fieldMetadata": {},
"rawFormatSupportTimeGroup": true,
"fieldName": "<string>",
"originalFieldName": "<string>"
}
],
"forbiddenFeatures": [
"<string>"
],
"auxiliary": true,
"cacheSettings": {
"rawCacheEnabled": true,
"rawCacheTtl": 2
}
}
],
"joins": [
{
"type": "INNER",
"leftDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"rightDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"conditions": [
{
"leftFieldName": "left_field_name",
"rightFieldName": "right_field_name"
}
]
}
]
},
"tags": [
"<string>"
],
"originId": "<string>",
"scope": "ACCOUNT",
"workspaceId": "<string>",
"projectId": 2222,
"folderId": 1111,
"positionConfiguration": {}
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"name": "Source Name",
"id": "59ba04795b542f60838ce0ea",
"description": "<string>",
"auditable": {
"createdByUserId": "59ba04795b542f60838ce0e1",
"createdByUserName": "user_name",
"createdDate": "2023-11-07T05:31:56Z",
"lastModifiedByUserId": "59ba04795b542f60838ce0e2",
"lastModifiedDate": "2023-11-07T05:31:56Z"
},
"storage": {
"dataEntities": [
{
"type": "SINGLE_COLLECTION",
"id": "data_entity_id",
"name": "Data Entity name",
"singleCollection": {
"connectionId": "59ba04795b542f60838ce0eb",
"collection": "real_time_sales",
"schema": "public",
"parameters": {}
},
"customSql": {
"connectionId": "59ba04795b542f60838ce0eb",
"sql": "select price * 100 as price, product_id from products"
},
"index": {
"connectionId": "59ba04795b542f60838ce0eb",
"collections": [
"log-1",
"log-2",
"log-3"
],
"patternType": "NATIVE",
"pattern": "log-*"
},
"upload": {
"uploadId": "59ba04795b542f60838ce0ec"
},
"nativeFields": [
{
"origin": {
"type": "NATIVE",
"nativeOrigin": {
"originalName": "field_name",
"originalType": "TIME",
"dataEntityId": "data_entity_1",
"rawFormat": {},
"metaFlags": [
"PLAYABLE"
],
"partitionedBy": {
"field": "<string>",
"function": "MURMUR3_HASH"
}
},
"derivedOrigin": {
"expression": "sales * 100",
"calendarId": "<string>",
"referencedFieldNames": [
"<string>"
]
},
"hierarchyOrigin": {
"childParent": {
"childField": "<string>",
"parentField": "<string>"
},
"labelField": "<string>"
}
},
"name": "field_name",
"label": "Field Label",
"visible": true,
"defaultMetric": "avg",
"dataType": "ATTRIBUTE",
"format": {
"time": {
"granularity": "MILLISECOND",
"timeZone": "UTC",
"options": {
"second": "NUMERIC",
"minute": "NUMERIC",
"hour": "NUMERIC",
"day": "NUMERIC",
"weekday": "LONG",
"week": "TWO_DIGIT",
"month": "NUMERIC",
"quarter": "TWO_DIGIT",
"year": "NUMERIC",
"dayOfYear": "NUMERIC",
"hour12": true
}
},
"number": {
"type": "PLAIN",
"decimals": 2,
"separator": true,
"negative": "SIGNED",
"standardUnit": "NONE",
"storageUnit": "BYTES",
"currencyCode": "USD"
},
"url": {
"type": "LINK",
"src": "<string>",
"width": 123,
"height": 123
}
},
"statistics": {
"override": {
"min": 123,
"max": 123,
"distinctValues": [
"<unknown>"
]
},
"cacheEnabled": true,
"refreshable": true,
"lookup": {
"raw": {
"dataEntityId": "<string>",
"originalFieldName": "<string>"
}
},
"cardinality": 123
},
"facetFiltering": {
"enabled": true,
"order": 2
},
"granularity": "MILLISECOND",
"disabledCapabilities": [
"<string>"
],
"fieldMetadata": {},
"rawFormatSupportTimeGroup": true,
"fieldName": "<string>",
"originalFieldName": "<string>"
}
],
"forbiddenFeatures": [
"<string>"
],
"auxiliary": true,
"cacheSettings": {
"rawCacheEnabled": true,
"rawCacheTtl": 2
}
}
],
"joins": [
{
"type": "INNER",
"leftDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"rightDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"conditions": [
{
"leftFieldName": "left_field_name",
"rightFieldName": "right_field_name"
}
]
}
]
},
"tags": [
"<string>"
],
"originId": "<string>",
"scope": "ACCOUNT",
"workspaceId": "<string>",
"projectId": 2222,
"folderId": 1111,
"positionConfiguration": {}
}Updates or creates a source
Requires WRITE permission on the source for updating and CREATE_SOURCES privilege for creation
curl --request PUT \
--url http://10.2.4.166:8080/composer/api/sources/{sourceId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--data '
{
"name": "Source Name",
"description": "<string>",
"tags": [
"<string>"
],
"folderId": 1111,
"positionConfiguration": {}
}
'import requests
url = "http://10.2.4.166:8080/composer/api/sources/{sourceId}"
payload = {
"name": "Source Name",
"description": "<string>",
"tags": ["<string>"],
"folderId": 1111,
"positionConfiguration": {}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({
name: 'Source Name',
description: '<string>',
tags: ['<string>'],
folderId: 1111,
positionConfiguration: {}
})
};
fetch('http://10.2.4.166:8080/composer/api/sources/{sourceId}', 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/sources/{sourceId}",
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([
'name' => 'Source Name',
'description' => '<string>',
'tags' => [
'<string>'
],
'folderId' => 1111,
'positionConfiguration' => [
]
]),
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/sources/{sourceId}"
payload := strings.NewReader("{\n \"name\": \"Source Name\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"folderId\": 1111,\n \"positionConfiguration\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("http://10.2.4.166:8080/composer/api/sources/{sourceId}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"name\": \"Source Name\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"folderId\": 1111,\n \"positionConfiguration\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/sources/{sourceId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"name\": \"Source Name\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"folderId\": 1111,\n \"positionConfiguration\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "Source Name",
"id": "59ba04795b542f60838ce0ea",
"description": "<string>",
"auditable": {
"createdByUserId": "59ba04795b542f60838ce0e1",
"createdByUserName": "user_name",
"createdDate": "2023-11-07T05:31:56Z",
"lastModifiedByUserId": "59ba04795b542f60838ce0e2",
"lastModifiedDate": "2023-11-07T05:31:56Z"
},
"storage": {
"dataEntities": [
{
"type": "SINGLE_COLLECTION",
"id": "data_entity_id",
"name": "Data Entity name",
"singleCollection": {
"connectionId": "59ba04795b542f60838ce0eb",
"collection": "real_time_sales",
"schema": "public",
"parameters": {}
},
"customSql": {
"connectionId": "59ba04795b542f60838ce0eb",
"sql": "select price * 100 as price, product_id from products"
},
"index": {
"connectionId": "59ba04795b542f60838ce0eb",
"collections": [
"log-1",
"log-2",
"log-3"
],
"patternType": "NATIVE",
"pattern": "log-*"
},
"upload": {
"uploadId": "59ba04795b542f60838ce0ec"
},
"nativeFields": [
{
"origin": {
"type": "NATIVE",
"nativeOrigin": {
"originalName": "field_name",
"originalType": "TIME",
"dataEntityId": "data_entity_1",
"rawFormat": {},
"metaFlags": [
"PLAYABLE"
],
"partitionedBy": {
"field": "<string>",
"function": "MURMUR3_HASH"
}
},
"derivedOrigin": {
"expression": "sales * 100",
"calendarId": "<string>",
"referencedFieldNames": [
"<string>"
]
},
"hierarchyOrigin": {
"childParent": {
"childField": "<string>",
"parentField": "<string>"
},
"labelField": "<string>"
}
},
"name": "field_name",
"label": "Field Label",
"visible": true,
"defaultMetric": "avg",
"dataType": "ATTRIBUTE",
"format": {
"time": {
"granularity": "MILLISECOND",
"timeZone": "UTC",
"options": {
"second": "NUMERIC",
"minute": "NUMERIC",
"hour": "NUMERIC",
"day": "NUMERIC",
"weekday": "LONG",
"week": "TWO_DIGIT",
"month": "NUMERIC",
"quarter": "TWO_DIGIT",
"year": "NUMERIC",
"dayOfYear": "NUMERIC",
"hour12": true
}
},
"number": {
"type": "PLAIN",
"decimals": 2,
"separator": true,
"negative": "SIGNED",
"standardUnit": "NONE",
"storageUnit": "BYTES",
"currencyCode": "USD"
},
"url": {
"type": "LINK",
"src": "<string>",
"width": 123,
"height": 123
}
},
"statistics": {
"override": {
"min": 123,
"max": 123,
"distinctValues": [
"<unknown>"
]
},
"cacheEnabled": true,
"refreshable": true,
"lookup": {
"raw": {
"dataEntityId": "<string>",
"originalFieldName": "<string>"
}
},
"cardinality": 123
},
"facetFiltering": {
"enabled": true,
"order": 2
},
"granularity": "MILLISECOND",
"disabledCapabilities": [
"<string>"
],
"fieldMetadata": {},
"rawFormatSupportTimeGroup": true,
"fieldName": "<string>",
"originalFieldName": "<string>"
}
],
"forbiddenFeatures": [
"<string>"
],
"auxiliary": true,
"cacheSettings": {
"rawCacheEnabled": true,
"rawCacheTtl": 2
}
}
],
"joins": [
{
"type": "INNER",
"leftDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"rightDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"conditions": [
{
"leftFieldName": "left_field_name",
"rightFieldName": "right_field_name"
}
]
}
]
},
"tags": [
"<string>"
],
"originId": "<string>",
"scope": "ACCOUNT",
"workspaceId": "<string>",
"projectId": 2222,
"folderId": 1111,
"positionConfiguration": {}
}{
"name": "Source Name",
"id": "59ba04795b542f60838ce0ea",
"description": "<string>",
"auditable": {
"createdByUserId": "59ba04795b542f60838ce0e1",
"createdByUserName": "user_name",
"createdDate": "2023-11-07T05:31:56Z",
"lastModifiedByUserId": "59ba04795b542f60838ce0e2",
"lastModifiedDate": "2023-11-07T05:31:56Z"
},
"storage": {
"dataEntities": [
{
"type": "SINGLE_COLLECTION",
"id": "data_entity_id",
"name": "Data Entity name",
"singleCollection": {
"connectionId": "59ba04795b542f60838ce0eb",
"collection": "real_time_sales",
"schema": "public",
"parameters": {}
},
"customSql": {
"connectionId": "59ba04795b542f60838ce0eb",
"sql": "select price * 100 as price, product_id from products"
},
"index": {
"connectionId": "59ba04795b542f60838ce0eb",
"collections": [
"log-1",
"log-2",
"log-3"
],
"patternType": "NATIVE",
"pattern": "log-*"
},
"upload": {
"uploadId": "59ba04795b542f60838ce0ec"
},
"nativeFields": [
{
"origin": {
"type": "NATIVE",
"nativeOrigin": {
"originalName": "field_name",
"originalType": "TIME",
"dataEntityId": "data_entity_1",
"rawFormat": {},
"metaFlags": [
"PLAYABLE"
],
"partitionedBy": {
"field": "<string>",
"function": "MURMUR3_HASH"
}
},
"derivedOrigin": {
"expression": "sales * 100",
"calendarId": "<string>",
"referencedFieldNames": [
"<string>"
]
},
"hierarchyOrigin": {
"childParent": {
"childField": "<string>",
"parentField": "<string>"
},
"labelField": "<string>"
}
},
"name": "field_name",
"label": "Field Label",
"visible": true,
"defaultMetric": "avg",
"dataType": "ATTRIBUTE",
"format": {
"time": {
"granularity": "MILLISECOND",
"timeZone": "UTC",
"options": {
"second": "NUMERIC",
"minute": "NUMERIC",
"hour": "NUMERIC",
"day": "NUMERIC",
"weekday": "LONG",
"week": "TWO_DIGIT",
"month": "NUMERIC",
"quarter": "TWO_DIGIT",
"year": "NUMERIC",
"dayOfYear": "NUMERIC",
"hour12": true
}
},
"number": {
"type": "PLAIN",
"decimals": 2,
"separator": true,
"negative": "SIGNED",
"standardUnit": "NONE",
"storageUnit": "BYTES",
"currencyCode": "USD"
},
"url": {
"type": "LINK",
"src": "<string>",
"width": 123,
"height": 123
}
},
"statistics": {
"override": {
"min": 123,
"max": 123,
"distinctValues": [
"<unknown>"
]
},
"cacheEnabled": true,
"refreshable": true,
"lookup": {
"raw": {
"dataEntityId": "<string>",
"originalFieldName": "<string>"
}
},
"cardinality": 123
},
"facetFiltering": {
"enabled": true,
"order": 2
},
"granularity": "MILLISECOND",
"disabledCapabilities": [
"<string>"
],
"fieldMetadata": {},
"rawFormatSupportTimeGroup": true,
"fieldName": "<string>",
"originalFieldName": "<string>"
}
],
"forbiddenFeatures": [
"<string>"
],
"auxiliary": true,
"cacheSettings": {
"rawCacheEnabled": true,
"rawCacheTtl": 2
}
}
],
"joins": [
{
"type": "INNER",
"leftDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"rightDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"conditions": [
{
"leftFieldName": "left_field_name",
"rightFieldName": "right_field_name"
}
]
}
]
},
"tags": [
"<string>"
],
"originId": "<string>",
"scope": "ACCOUNT",
"workspaceId": "<string>",
"projectId": 2222,
"folderId": 1111,
"positionConfiguration": {}
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"name": "Source Name",
"id": "59ba04795b542f60838ce0ea",
"description": "<string>",
"auditable": {
"createdByUserId": "59ba04795b542f60838ce0e1",
"createdByUserName": "user_name",
"createdDate": "2023-11-07T05:31:56Z",
"lastModifiedByUserId": "59ba04795b542f60838ce0e2",
"lastModifiedDate": "2023-11-07T05:31:56Z"
},
"storage": {
"dataEntities": [
{
"type": "SINGLE_COLLECTION",
"id": "data_entity_id",
"name": "Data Entity name",
"singleCollection": {
"connectionId": "59ba04795b542f60838ce0eb",
"collection": "real_time_sales",
"schema": "public",
"parameters": {}
},
"customSql": {
"connectionId": "59ba04795b542f60838ce0eb",
"sql": "select price * 100 as price, product_id from products"
},
"index": {
"connectionId": "59ba04795b542f60838ce0eb",
"collections": [
"log-1",
"log-2",
"log-3"
],
"patternType": "NATIVE",
"pattern": "log-*"
},
"upload": {
"uploadId": "59ba04795b542f60838ce0ec"
},
"nativeFields": [
{
"origin": {
"type": "NATIVE",
"nativeOrigin": {
"originalName": "field_name",
"originalType": "TIME",
"dataEntityId": "data_entity_1",
"rawFormat": {},
"metaFlags": [
"PLAYABLE"
],
"partitionedBy": {
"field": "<string>",
"function": "MURMUR3_HASH"
}
},
"derivedOrigin": {
"expression": "sales * 100",
"calendarId": "<string>",
"referencedFieldNames": [
"<string>"
]
},
"hierarchyOrigin": {
"childParent": {
"childField": "<string>",
"parentField": "<string>"
},
"labelField": "<string>"
}
},
"name": "field_name",
"label": "Field Label",
"visible": true,
"defaultMetric": "avg",
"dataType": "ATTRIBUTE",
"format": {
"time": {
"granularity": "MILLISECOND",
"timeZone": "UTC",
"options": {
"second": "NUMERIC",
"minute": "NUMERIC",
"hour": "NUMERIC",
"day": "NUMERIC",
"weekday": "LONG",
"week": "TWO_DIGIT",
"month": "NUMERIC",
"quarter": "TWO_DIGIT",
"year": "NUMERIC",
"dayOfYear": "NUMERIC",
"hour12": true
}
},
"number": {
"type": "PLAIN",
"decimals": 2,
"separator": true,
"negative": "SIGNED",
"standardUnit": "NONE",
"storageUnit": "BYTES",
"currencyCode": "USD"
},
"url": {
"type": "LINK",
"src": "<string>",
"width": 123,
"height": 123
}
},
"statistics": {
"override": {
"min": 123,
"max": 123,
"distinctValues": [
"<unknown>"
]
},
"cacheEnabled": true,
"refreshable": true,
"lookup": {
"raw": {
"dataEntityId": "<string>",
"originalFieldName": "<string>"
}
},
"cardinality": 123
},
"facetFiltering": {
"enabled": true,
"order": 2
},
"granularity": "MILLISECOND",
"disabledCapabilities": [
"<string>"
],
"fieldMetadata": {},
"rawFormatSupportTimeGroup": true,
"fieldName": "<string>",
"originalFieldName": "<string>"
}
],
"forbiddenFeatures": [
"<string>"
],
"auxiliary": true,
"cacheSettings": {
"rawCacheEnabled": true,
"rawCacheTtl": 2
}
}
],
"joins": [
{
"type": "INNER",
"leftDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"rightDataEntity": {
"dataEntityId": "data_entity_id",
"dimension": false
},
"conditions": [
{
"leftFieldName": "left_field_name",
"rightFieldName": "right_field_name"
}
]
}
]
},
"tags": [
"<string>"
],
"originId": "<string>",
"scope": "ACCOUNT",
"workspaceId": "<string>",
"projectId": 2222,
"folderId": 1111,
"positionConfiguration": {}
}Authorizations
HTTP Basic authentication using global administrator credentials (username and password).
Headers
Scopes this request to the given workspace. Takes priority over the workspaceId query parameter. When omitted, falls back to account scope. Only applies when this call creates a new source.
Path Parameters
Query Parameters
The response to this API endpoint may return a validation error with a list of problems. Each problem has a level (ERROR, WARNING). Passing suppressWarnings=true will suppress all warnings and the request will succeed if there are no errors
If suppressWarning is true, then warning tags can be passed in this field. Any top level element(SOURCE/VISUAL/DASHBOARD) that may be impacted due to any WARNING will get these warning tags attached to them.
Body
Source name. It must be unique within the account
255"Source Name"
1500Describes how and from where we get data
Show child attributes
Show child attributes
Tags. Note: Tags are not supported as a sort parameter in the pagination API.
Optional folder ID for organizing the source within a project.
1111
Defines position configuration of collections in canvas
Show child attributes
Show child attributes
Response
The source was updated
Source name. It must be unique within the account
255"Source Name"
Unique identifier of the source
"59ba04795b542f60838ce0ea"
1500Contains information about users and time of creating and updating this object
Show child attributes
Show child attributes
Describes how and from where we get data
Show child attributes
Show child attributes
Tags. Note: Tags are not supported as a sort parameter in the pagination API.
Id of the exported source
Scope of the source: ACCOUNT (visible account-wide) or WORKSPACE (visible only inside the owning workspace). Derived from the caller's active workspace at creation time and cannot be set directly.
ACCOUNT, WORKSPACE Id of the workspace this source belongs to, when scope is WORKSPACE. This field is read-only.
Project ID where this source is organized. This field is read-only.
2222
Optional folder ID for organizing the source within a project.
1111
Defines position configuration of collections in canvas
Show child attributes
Show child attributes
Was this page helpful?