curl --request POST \
--url https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"dataset_id": 123,
"connection_id": 123,
"route": "<string>",
"headers": [
{
"key": "<string>",
"value": "<string>"
}
],
"body": "<string>",
"useGlobalHeaders": true,
"query": "<string>",
"pagination": false,
"items": "items",
"itemsLimit": 0,
"offset": "offset",
"paginationField": "<string>",
"template": "<string>",
"conditions": [
{
"field": "<string>",
"value": "<string>"
}
],
"configuration": {
"populateAttributes": true,
"mainCollectionSample": "<string>",
"subCollectionSample": "<string>",
"selectedSubCollection": "<string>",
"limit": 123,
"orderBy": "<string>",
"accountId": "<string>",
"propertyId": "<string>",
"metrics": "<string>",
"dimensions": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"limitToLast": 123,
"limitToFirst": 123
},
"variables": {},
"Connection": {
"id": 123,
"name": "<string>",
"type": "<string>",
"subType": "<string>",
"host": "<string>"
},
"VariableBindings": [
{
"id": 123,
"entity_id": "<string>",
"name": "<string>",
"type": "<string>",
"default_value": "<string>",
"required": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
'import requests
url = "https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests"
payload = {
"id": 123,
"dataset_id": 123,
"connection_id": 123,
"route": "<string>",
"headers": [
{
"key": "<string>",
"value": "<string>"
}
],
"body": "<string>",
"useGlobalHeaders": True,
"query": "<string>",
"pagination": False,
"items": "items",
"itemsLimit": 0,
"offset": "offset",
"paginationField": "<string>",
"template": "<string>",
"conditions": [
{
"field": "<string>",
"value": "<string>"
}
],
"configuration": {
"populateAttributes": True,
"mainCollectionSample": "<string>",
"subCollectionSample": "<string>",
"selectedSubCollection": "<string>",
"limit": 123,
"orderBy": "<string>",
"accountId": "<string>",
"propertyId": "<string>",
"metrics": "<string>",
"dimensions": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"limitToLast": 123,
"limitToFirst": 123
},
"variables": {},
"Connection": {
"id": 123,
"name": "<string>",
"type": "<string>",
"subType": "<string>",
"host": "<string>"
},
"VariableBindings": [
{
"id": 123,
"entity_id": "<string>",
"name": "<string>",
"type": "<string>",
"default_value": "<string>",
"required": True,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
dataset_id: 123,
connection_id: 123,
route: '<string>',
headers: [{key: '<string>', value: '<string>'}],
body: JSON.stringify('<string>'),
useGlobalHeaders: true,
query: '<string>',
pagination: false,
items: 'items',
itemsLimit: 0,
offset: 'offset',
paginationField: '<string>',
template: '<string>',
conditions: [{field: '<string>', value: '<string>'}],
configuration: {
populateAttributes: true,
mainCollectionSample: '<string>',
subCollectionSample: '<string>',
selectedSubCollection: '<string>',
limit: 123,
orderBy: '<string>',
accountId: '<string>',
propertyId: '<string>',
metrics: '<string>',
dimensions: '<string>',
startDate: '<string>',
endDate: '<string>',
limitToLast: 123,
limitToFirst: 123
},
variables: {},
Connection: {
id: 123,
name: '<string>',
type: '<string>',
subType: '<string>',
host: '<string>'
},
VariableBindings: [
{
id: 123,
entity_id: '<string>',
name: '<string>',
type: '<string>',
default_value: '<string>',
required: true,
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests",
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' => 123,
'dataset_id' => 123,
'connection_id' => 123,
'route' => '<string>',
'headers' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'body' => '<string>',
'useGlobalHeaders' => true,
'query' => '<string>',
'pagination' => false,
'items' => 'items',
'itemsLimit' => 0,
'offset' => 'offset',
'paginationField' => '<string>',
'template' => '<string>',
'conditions' => [
[
'field' => '<string>',
'value' => '<string>'
]
],
'configuration' => [
'populateAttributes' => true,
'mainCollectionSample' => '<string>',
'subCollectionSample' => '<string>',
'selectedSubCollection' => '<string>',
'limit' => 123,
'orderBy' => '<string>',
'accountId' => '<string>',
'propertyId' => '<string>',
'metrics' => '<string>',
'dimensions' => '<string>',
'startDate' => '<string>',
'endDate' => '<string>',
'limitToLast' => 123,
'limitToFirst' => 123
],
'variables' => [
],
'Connection' => [
'id' => 123,
'name' => '<string>',
'type' => '<string>',
'subType' => '<string>',
'host' => '<string>'
],
'VariableBindings' => [
[
'id' => 123,
'entity_id' => '<string>',
'name' => '<string>',
'type' => '<string>',
'default_value' => '<string>',
'required' => true,
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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 := "https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests"
payload := strings.NewReader("{\n \"id\": 123,\n \"dataset_id\": 123,\n \"connection_id\": 123,\n \"route\": \"<string>\",\n \"headers\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"useGlobalHeaders\": true,\n \"query\": \"<string>\",\n \"pagination\": false,\n \"items\": \"items\",\n \"itemsLimit\": 0,\n \"offset\": \"offset\",\n \"paginationField\": \"<string>\",\n \"template\": \"<string>\",\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"configuration\": {\n \"populateAttributes\": true,\n \"mainCollectionSample\": \"<string>\",\n \"subCollectionSample\": \"<string>\",\n \"selectedSubCollection\": \"<string>\",\n \"limit\": 123,\n \"orderBy\": \"<string>\",\n \"accountId\": \"<string>\",\n \"propertyId\": \"<string>\",\n \"metrics\": \"<string>\",\n \"dimensions\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"limitToLast\": 123,\n \"limitToFirst\": 123\n },\n \"variables\": {},\n \"Connection\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subType\": \"<string>\",\n \"host\": \"<string>\"\n },\n \"VariableBindings\": [\n {\n \"id\": 123,\n \"entity_id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default_value\": \"<string>\",\n \"required\": true,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 123,\n \"dataset_id\": 123,\n \"connection_id\": 123,\n \"route\": \"<string>\",\n \"headers\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"useGlobalHeaders\": true,\n \"query\": \"<string>\",\n \"pagination\": false,\n \"items\": \"items\",\n \"itemsLimit\": 0,\n \"offset\": \"offset\",\n \"paginationField\": \"<string>\",\n \"template\": \"<string>\",\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"configuration\": {\n \"populateAttributes\": true,\n \"mainCollectionSample\": \"<string>\",\n \"subCollectionSample\": \"<string>\",\n \"selectedSubCollection\": \"<string>\",\n \"limit\": 123,\n \"orderBy\": \"<string>\",\n \"accountId\": \"<string>\",\n \"propertyId\": \"<string>\",\n \"metrics\": \"<string>\",\n \"dimensions\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"limitToLast\": 123,\n \"limitToFirst\": 123\n },\n \"variables\": {},\n \"Connection\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subType\": \"<string>\",\n \"host\": \"<string>\"\n },\n \"VariableBindings\": [\n {\n \"id\": 123,\n \"entity_id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default_value\": \"<string>\",\n \"required\": true,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 123,\n \"dataset_id\": 123,\n \"connection_id\": 123,\n \"route\": \"<string>\",\n \"headers\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"useGlobalHeaders\": true,\n \"query\": \"<string>\",\n \"pagination\": false,\n \"items\": \"items\",\n \"itemsLimit\": 0,\n \"offset\": \"offset\",\n \"paginationField\": \"<string>\",\n \"template\": \"<string>\",\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"configuration\": {\n \"populateAttributes\": true,\n \"mainCollectionSample\": \"<string>\",\n \"subCollectionSample\": \"<string>\",\n \"selectedSubCollection\": \"<string>\",\n \"limit\": 123,\n \"orderBy\": \"<string>\",\n \"accountId\": \"<string>\",\n \"propertyId\": \"<string>\",\n \"metrics\": \"<string>\",\n \"dimensions\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"limitToLast\": 123,\n \"limitToFirst\": 123\n },\n \"variables\": {},\n \"Connection\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subType\": \"<string>\",\n \"host\": \"<string>\"\n },\n \"VariableBindings\": [\n {\n \"id\": 123,\n \"entity_id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default_value\": \"<string>\",\n \"required\": true,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"dataset_id": 123,
"connection_id": 123,
"route": "<string>",
"headers": [
{
"key": "<string>",
"value": "<string>"
}
],
"body": "<string>",
"useGlobalHeaders": true,
"query": "<string>",
"pagination": false,
"items": "items",
"itemsLimit": 0,
"offset": "offset",
"paginationField": "<string>",
"template": "<string>",
"conditions": [
{
"field": "<string>",
"value": "<string>"
}
],
"configuration": {
"populateAttributes": true,
"mainCollectionSample": "<string>",
"subCollectionSample": "<string>",
"selectedSubCollection": "<string>",
"limit": 123,
"orderBy": "<string>",
"accountId": "<string>",
"propertyId": "<string>",
"metrics": "<string>",
"dimensions": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"limitToLast": 123,
"limitToFirst": 123
},
"variables": {},
"Connection": {
"id": 123,
"name": "<string>",
"type": "<string>",
"subType": "<string>",
"host": "<string>"
},
"VariableBindings": [
{
"id": 123,
"entity_id": "<string>",
"name": "<string>",
"type": "<string>",
"default_value": "<string>",
"required": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Create a Data Request
Create a data request
curl --request POST \
--url https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"dataset_id": 123,
"connection_id": 123,
"route": "<string>",
"headers": [
{
"key": "<string>",
"value": "<string>"
}
],
"body": "<string>",
"useGlobalHeaders": true,
"query": "<string>",
"pagination": false,
"items": "items",
"itemsLimit": 0,
"offset": "offset",
"paginationField": "<string>",
"template": "<string>",
"conditions": [
{
"field": "<string>",
"value": "<string>"
}
],
"configuration": {
"populateAttributes": true,
"mainCollectionSample": "<string>",
"subCollectionSample": "<string>",
"selectedSubCollection": "<string>",
"limit": 123,
"orderBy": "<string>",
"accountId": "<string>",
"propertyId": "<string>",
"metrics": "<string>",
"dimensions": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"limitToLast": 123,
"limitToFirst": 123
},
"variables": {},
"Connection": {
"id": 123,
"name": "<string>",
"type": "<string>",
"subType": "<string>",
"host": "<string>"
},
"VariableBindings": [
{
"id": 123,
"entity_id": "<string>",
"name": "<string>",
"type": "<string>",
"default_value": "<string>",
"required": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
'import requests
url = "https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests"
payload = {
"id": 123,
"dataset_id": 123,
"connection_id": 123,
"route": "<string>",
"headers": [
{
"key": "<string>",
"value": "<string>"
}
],
"body": "<string>",
"useGlobalHeaders": True,
"query": "<string>",
"pagination": False,
"items": "items",
"itemsLimit": 0,
"offset": "offset",
"paginationField": "<string>",
"template": "<string>",
"conditions": [
{
"field": "<string>",
"value": "<string>"
}
],
"configuration": {
"populateAttributes": True,
"mainCollectionSample": "<string>",
"subCollectionSample": "<string>",
"selectedSubCollection": "<string>",
"limit": 123,
"orderBy": "<string>",
"accountId": "<string>",
"propertyId": "<string>",
"metrics": "<string>",
"dimensions": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"limitToLast": 123,
"limitToFirst": 123
},
"variables": {},
"Connection": {
"id": 123,
"name": "<string>",
"type": "<string>",
"subType": "<string>",
"host": "<string>"
},
"VariableBindings": [
{
"id": 123,
"entity_id": "<string>",
"name": "<string>",
"type": "<string>",
"default_value": "<string>",
"required": True,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
dataset_id: 123,
connection_id: 123,
route: '<string>',
headers: [{key: '<string>', value: '<string>'}],
body: JSON.stringify('<string>'),
useGlobalHeaders: true,
query: '<string>',
pagination: false,
items: 'items',
itemsLimit: 0,
offset: 'offset',
paginationField: '<string>',
template: '<string>',
conditions: [{field: '<string>', value: '<string>'}],
configuration: {
populateAttributes: true,
mainCollectionSample: '<string>',
subCollectionSample: '<string>',
selectedSubCollection: '<string>',
limit: 123,
orderBy: '<string>',
accountId: '<string>',
propertyId: '<string>',
metrics: '<string>',
dimensions: '<string>',
startDate: '<string>',
endDate: '<string>',
limitToLast: 123,
limitToFirst: 123
},
variables: {},
Connection: {
id: 123,
name: '<string>',
type: '<string>',
subType: '<string>',
host: '<string>'
},
VariableBindings: [
{
id: 123,
entity_id: '<string>',
name: '<string>',
type: '<string>',
default_value: '<string>',
required: true,
createdAt: '2023-11-07T05:31:56Z',
updatedAt: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests",
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' => 123,
'dataset_id' => 123,
'connection_id' => 123,
'route' => '<string>',
'headers' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'body' => '<string>',
'useGlobalHeaders' => true,
'query' => '<string>',
'pagination' => false,
'items' => 'items',
'itemsLimit' => 0,
'offset' => 'offset',
'paginationField' => '<string>',
'template' => '<string>',
'conditions' => [
[
'field' => '<string>',
'value' => '<string>'
]
],
'configuration' => [
'populateAttributes' => true,
'mainCollectionSample' => '<string>',
'subCollectionSample' => '<string>',
'selectedSubCollection' => '<string>',
'limit' => 123,
'orderBy' => '<string>',
'accountId' => '<string>',
'propertyId' => '<string>',
'metrics' => '<string>',
'dimensions' => '<string>',
'startDate' => '<string>',
'endDate' => '<string>',
'limitToLast' => 123,
'limitToFirst' => 123
],
'variables' => [
],
'Connection' => [
'id' => 123,
'name' => '<string>',
'type' => '<string>',
'subType' => '<string>',
'host' => '<string>'
],
'VariableBindings' => [
[
'id' => 123,
'entity_id' => '<string>',
'name' => '<string>',
'type' => '<string>',
'default_value' => '<string>',
'required' => true,
'createdAt' => '2023-11-07T05:31:56Z',
'updatedAt' => '2023-11-07T05:31:56Z'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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 := "https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests"
payload := strings.NewReader("{\n \"id\": 123,\n \"dataset_id\": 123,\n \"connection_id\": 123,\n \"route\": \"<string>\",\n \"headers\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"useGlobalHeaders\": true,\n \"query\": \"<string>\",\n \"pagination\": false,\n \"items\": \"items\",\n \"itemsLimit\": 0,\n \"offset\": \"offset\",\n \"paginationField\": \"<string>\",\n \"template\": \"<string>\",\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"configuration\": {\n \"populateAttributes\": true,\n \"mainCollectionSample\": \"<string>\",\n \"subCollectionSample\": \"<string>\",\n \"selectedSubCollection\": \"<string>\",\n \"limit\": 123,\n \"orderBy\": \"<string>\",\n \"accountId\": \"<string>\",\n \"propertyId\": \"<string>\",\n \"metrics\": \"<string>\",\n \"dimensions\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"limitToLast\": 123,\n \"limitToFirst\": 123\n },\n \"variables\": {},\n \"Connection\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subType\": \"<string>\",\n \"host\": \"<string>\"\n },\n \"VariableBindings\": [\n {\n \"id\": 123,\n \"entity_id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default_value\": \"<string>\",\n \"required\": true,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 123,\n \"dataset_id\": 123,\n \"connection_id\": 123,\n \"route\": \"<string>\",\n \"headers\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"useGlobalHeaders\": true,\n \"query\": \"<string>\",\n \"pagination\": false,\n \"items\": \"items\",\n \"itemsLimit\": 0,\n \"offset\": \"offset\",\n \"paginationField\": \"<string>\",\n \"template\": \"<string>\",\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"configuration\": {\n \"populateAttributes\": true,\n \"mainCollectionSample\": \"<string>\",\n \"subCollectionSample\": \"<string>\",\n \"selectedSubCollection\": \"<string>\",\n \"limit\": 123,\n \"orderBy\": \"<string>\",\n \"accountId\": \"<string>\",\n \"propertyId\": \"<string>\",\n \"metrics\": \"<string>\",\n \"dimensions\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"limitToLast\": 123,\n \"limitToFirst\": 123\n },\n \"variables\": {},\n \"Connection\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subType\": \"<string>\",\n \"host\": \"<string>\"\n },\n \"VariableBindings\": [\n {\n \"id\": 123,\n \"entity_id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default_value\": \"<string>\",\n \"required\": true,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chartbrew.com/team/{team_id}/datasets/{dataset_id}/dataRequests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 123,\n \"dataset_id\": 123,\n \"connection_id\": 123,\n \"route\": \"<string>\",\n \"headers\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"useGlobalHeaders\": true,\n \"query\": \"<string>\",\n \"pagination\": false,\n \"items\": \"items\",\n \"itemsLimit\": 0,\n \"offset\": \"offset\",\n \"paginationField\": \"<string>\",\n \"template\": \"<string>\",\n \"conditions\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"configuration\": {\n \"populateAttributes\": true,\n \"mainCollectionSample\": \"<string>\",\n \"subCollectionSample\": \"<string>\",\n \"selectedSubCollection\": \"<string>\",\n \"limit\": 123,\n \"orderBy\": \"<string>\",\n \"accountId\": \"<string>\",\n \"propertyId\": \"<string>\",\n \"metrics\": \"<string>\",\n \"dimensions\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\",\n \"limitToLast\": 123,\n \"limitToFirst\": 123\n },\n \"variables\": {},\n \"Connection\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subType\": \"<string>\",\n \"host\": \"<string>\"\n },\n \"VariableBindings\": [\n {\n \"id\": 123,\n \"entity_id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"default_value\": \"<string>\",\n \"required\": true,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"dataset_id": 123,
"connection_id": 123,
"route": "<string>",
"headers": [
{
"key": "<string>",
"value": "<string>"
}
],
"body": "<string>",
"useGlobalHeaders": true,
"query": "<string>",
"pagination": false,
"items": "items",
"itemsLimit": 0,
"offset": "offset",
"paginationField": "<string>",
"template": "<string>",
"conditions": [
{
"field": "<string>",
"value": "<string>"
}
],
"configuration": {
"populateAttributes": true,
"mainCollectionSample": "<string>",
"subCollectionSample": "<string>",
"selectedSubCollection": "<string>",
"limit": 123,
"orderBy": "<string>",
"accountId": "<string>",
"propertyId": "<string>",
"metrics": "<string>",
"dimensions": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"limitToLast": 123,
"limitToFirst": 123
},
"variables": {},
"Connection": {
"id": 123,
"name": "<string>",
"type": "<string>",
"subType": "<string>",
"host": "<string>"
},
"VariableBindings": [
{
"id": 123,
"entity_id": "<string>",
"name": "<string>",
"type": "<string>",
"default_value": "<string>",
"required": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Reference to Dataset model
Reference to Connection model
GET, POST, PUT, DELETE, PATCH API endpoint path
Show child attributes
Show child attributes
Request body in JSON string format
Path to items array in response
Maximum number of items to return
Pagination offset field name
Field used for pagination
Template type for request formatting
Show child attributes
Show child attributes
Configuration options for data requests. Fields vary by connection type. Only include fields relevant to your connection type.
Show child attributes
Show child attributes
Request variables
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Data request created successfully
Reference to Dataset model
Reference to Connection model
GET, POST, PUT, DELETE, PATCH API endpoint path
Show child attributes
Show child attributes
Request body in JSON string format
Path to items array in response
Maximum number of items to return
Pagination offset field name
Field used for pagination
Template type for request formatting
Show child attributes
Show child attributes
Configuration options for data requests. Fields vary by connection type. Only include fields relevant to your connection type.
Show child attributes
Show child attributes
Request variables
Show child attributes
Show child attributes
Show child attributes
Show child attributes