Once you’ve sent data to the Nexosis API and perhaps run a Forecast session to generate some forecasts, how do you get those results back out?
GET
to /data.Optionally, you can provide a partialName
parameter in the query string that filters the DataSets you get back to only those whose name contain that string.
The response is a summary listing of your DataSets
{
"dataSets": [
{ "dataSetName": "Sales" },
{ "dataSetName": "test1234" }
]
}
GET
request to /data/{dataSetName}, where dataSetName
is the name you provided when uploading the DataSet, or in the case of a Session-Scoped DataSet the generated name. You can get that name from the Links section of the Session.You can also pass one or more of the following optional parameters in the query string.
startDate
- Limits results to those on or after the specified dateendDate
- Limits results to those on or before the specified datepage
- Zero-based page number of results to retrievepageSize
- Count of results to retrieve in each page (max 1000)include
- Limits results to the specified columnsThe response from this request will look like the following:
{
"data": [
{
"timestamp": "2013-01-01T00:00:00+00:00",
"sales": 1500.56,
"orders": 150
},
{
"timestamp": "2013-01-02T00:00:00+00:00",
"sales": 4078.52,
"orders": 407
},
...
]
}
Where timestamp
is the date and time being observed and values
are a dictionary of values observed at that time.