Insights

Rohit K
Rohit K
  • Updated

List Datasets

This API list all of the datasets created in respective instance. 

Request

Headers

 Name
 Type
 Required
syncariId

Id of the instance the api is to be run against

string
 
clientRequestId
Client side request id to be used for idempotency in the future

 

string
required-table (1).svg

 

Body (application/json)

Name Type Required Notes
cursorToken string    
limit string    

Example

Request Sample

curl --request GET --url https://api.syncari.com/api/v1/datasets \
    --header 'Accept: application/json' \
    --header 'Authorization: xxxxxxxxxx' \
    --header 'Content-Type: application/json' \
    --header 'clientRequestId: 123456789' \
    --header 'syncariId: xxxxxx' \

 

Response Sample

"success":true,
"requestId":"4242066335",
"timestamp":"2024-08-08T22:04:32.757186Z",
"result":[
{
"id":"65288b47e4f8453d09adba1e",
"name":"avgRevenueForAllAccountsDS",
"createdBy":null,
"createdAt":"2023-10-13T00:11:51.750+00:00",
"updatedBy":null,
"updatedAt":"2023-10-13T00:11:51.750+00:00",
"displayName":"Average sales per account",
"description":null,
"hidden":false,
"seeded":true,
"draftStatus":"APPROVED",
"tags":[

],
"datasetConfig":{
"calculatedFields":[
{
"aliasName":"Average sales per Account",
"datasetFields":[

],
"innerProjections":[
{
"aliasName":null,
"datasetFields":[
{
"apiName":"amount",
"displayName":null,
"dataType":"text",
"datasetId":null,
"datastoreName":null,
"datasetType":"COLUMN",
"fieldId":null,
"alias":null,
"datasourceAlias":""
}
],
"innerProjections":null,
"aggFunctions":"SUM",
"dataType":"double",
"apiName":"amount"
},
{
"aliasName":null,
"datasetFields":[
{
"apiName":"accountid",
"displayName":null,
"dataType":"text",
"datasetId":null,
"datastoreName":null,
"datasetType":"COLUMN",
"fieldId":null,
"alias":null,
"datasourceAlias":""
}
],
"innerProjections":null,
"aggFunctions":"COUNT",
"dataType":"integer",
"apiName":"accountid"
}
],
"aggFunctions":"DIVIDE",
"dataType":"double",
"apiName":"(SUM(\"amount\")/COUNT(DISTINCT \"accountid\")) \"Average sales per Account\""
}
],
"selectedFields":[

],
"fromDataset":[
{
"apiName":"opportunity",
"displayName":"Opportunity",
"datasetId":"60da1bdeffb505076ac4e75c",
"description":null,
"alias":"Opportunity",
"datasetType":"ENTITY"
}
],
"filter":{
"predicates":[
{
"left":{
"apiName":"IsClosed",
"type":"variable",
"value":"60da1bdeffb505076ac4e827",
"fieldId":"60da1bdeffb505076ac4e827",
"datasetId":"60da1bdeffb505076ac4e75c",
"dataType":"boolean",
"datasetType":"ENTITY"
},
"operator":"ne",
"right":{
"value":false,
"type":"literal",
"dataType":"boolean"
}
},
{
"left":{
"apiName":"IsWon",
"type":"variable",
"value":"60da1bdeffb505076ac4e828",
"fieldId":"60da1bdeffb505076ac4e828",
"datasetId":"60da1bdeffb505076ac4e75c",
"dataType":"boolean",
"datasetType":"ENTITY"
},
"operator":"ne",
"right":{
"value":false,
"type":"literal"
}
}
],
"groupPredicateId":"65288b47e4f8453d09adba18",
"operator":"and"
},
"joins":[

],
"groupBy":[

],
"sort":[

],
"limit":null,
"configMode":"BASIC",
"group":false
},
"variablesMap":null
}]}

Read dataset data

 

This api return data for given dataset id in request endpoint

Request

Headers

 Name
 Type
 Required
syncariId

Id of the instance the api is to be run against

string
 
clientRequestId
Client side request id to be used for idempotency in the future

 

string
required-table (1).svg

 

Body (application/json)

Name Type Required Notes
cursorToken string    
limit string    

Example

Request Sample

curl --request POST --url https://api.syncari.com/api/v1/datasets/${datasetId} \
    --header 'Accept: application/json' \
    --header 'Authorization: xxxxxxxxxx' \
    --header 'Content-Type: application/json' \
    --header 'clientRequestId: 123456789' \
    --header 'syncariId: xxxxxx' \

 

Response Sample

{
"success": true,
"requestId": "3783533306",
"timestamp": "2024-08-08T23:07:34.616022Z",
"result": {
"id": null,
"columns": [
{
"displayName": "Average sales per Account",
"apiName": "(SUM(\"amount\")/COUNT(DISTINCT \"accountid\")) \"Average sales per Account\""
}
],
"data": [
[
{
"columnDisplayName": "Average sales per Account",
"value": 44000
}
]
],
"pageInfo": {
"start": "MA==",
"end": "MQ==",
"hasMore": false,
"hasPrevious": false,
"totalCount": 1
}
}
}
Share this

Was this article helpful?

0 out of 0 found this helpful