Retrieving Data


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?


Listing DataSets

You can retrieve a listing of all of the DataSets you’ve uploaded by issuing a 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" }
   ]
}

Note this listing only includes Named DataSets. It does not include Session-Scoped DataSets.


Retrieving Data

To retrieve data from a DataSet, issue a 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 of the following optional parameters in the query string.

  • startDate - Limits results to those on or after the specified date
  • endDate - Limits results to those on or before the specified date
  • page - Zero-based page number of results to retrieve
  • pageSize - Count of results to retrieve in each page (max 1000)
  • include - Limits results to the specified columns

The 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.


   Data CSV JSON