curl --request GET \
--url http://10.2.4.166:8080/composer/api/sources \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://10.2.4.166:8080/composer/api/sources"
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', 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",
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"
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")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/sources")
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{
"content": [
{
"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": {}
}
],
"pageInfo": {
"nextPageToken": "<string>",
"previousPageToken": "<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": {}
}
]
}{
"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": {}
}
]
}Returns a list of the sources
Requires READ permission on the sources
curl --request GET \
--url http://10.2.4.166:8080/composer/api/sources \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://10.2.4.166:8080/composer/api/sources"
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', 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",
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"
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")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/sources")
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{
"content": [
{
"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": {}
}
],
"pageInfo": {
"nextPageToken": "<string>",
"previousPageToken": "<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": {}
}
]
}{
"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": {}
}
]
}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.
Query Parameters
x >= 0Defines filter to search by. Supports only boolean, string, number, date time literal types on primary fields like name, id, description etc. Operators supported are =, != or <>, like, ilike, >, >=, <, <=, is null, is not null, in, and, or, not, is empty, is not empty. Tag supports in, and, is empty, is not empty, not operators. Other operators might not return expected result. Nested objects, array properties are not supported.
Defines sort order for results. Supports only primary fields like name, id, description etc with direction ASC or DESC. Nested objects, array properties are not supported.(Example: tags)
Only meaningful while inside a workspace. ACCOUNT forces account-scoped sources; ALL returns both workspace and account sources. Ignored when no workspace is active.
ACCOUNT, ALL Was this page helpful?