curl --request GET \
--url http://10.2.4.166:8080/composer/api/sources/{sourceId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://10.2.4.166:8080/composer/api/sources/{sourceId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://10.2.4.166:8080/composer/api/sources/{sourceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://10.2.4.166:8080/composer/api/sources/{sourceId}")
.header("Authorization", "Basic <encoded-value>")
.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::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
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": {}
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"error": "<string>",
"message": "<string>",
"path": "<string>"
}{
"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": {}
}
]
}Returns a data source by id
Requires READ permission on the source
curl --request GET \
--url http://10.2.4.166:8080/composer/api/sources/{sourceId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://10.2.4.166:8080/composer/api/sources/{sourceId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://10.2.4.166:8080/composer/api/sources/{sourceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://10.2.4.166:8080/composer/api/sources/{sourceId}")
.header("Authorization", "Basic <encoded-value>")
.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::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
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": {}
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"path": "<string>",
"status": "<string>",
"code": "<string>",
"errorCode": "<string>",
"timestamp": "<string>",
"problems": [
{
"name": "<string>",
"message": "<string>",
"level": "ERROR",
"dependencies": {}
}
]
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"error": "<string>",
"message": "<string>",
"path": "<string>"
}{
"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": {}
}
]
}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.
Path Parameters
Response
The data source was returned successfully
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?