v1

latestOpenAPI 3.1.02026-07-2616636641.7 KB
Forecast

Get forecast

Get the status and potential results of a running forecast.

get/forecaster/{Id}

Path parameters

Idstring required

The forecast id.

Response

Normal response, containing JSON response object for a final result.

idstring

The id of the requested forecast. It must be used when querying for the forecast results.

descstring

A textual description of the forecast execution status.

etastring

The expected time of accomplishment of the forecast: a datetime in the ISO 8601 format with timezone information. It is only available if there are partial results available (i.e., the progress is between 0% and 100%, exclusively).

status'enqueued' | 'started' | 'cancelled' | 'partial' | 'finished' | 'failed'

The status of the forecast execution. When forecasts are requested the result will always be "enqueued". Forecasts can transition between states during their processing. The states have the following meaning:

  • enqueued: The forecast request was accepted but hasn't started being processed yet.
  • started: The forecast request has started to be processed, but there are no partial results yet.
  • cancelled: The forecast request was cancelled by a user.
  • partial: The forecast has partial results.
  • finished: The forecast was completed.
  • failed: The forecast failed its execution.
progressnumber

The progress of the forecast request. It can be a number between 0.0 and 100.0. A forecast with progress 100.0 is finished.

requestDateTimestring

The time at which the request for this forecast was received, in UTC.

lastUpdateDateTimestring

The time at which the information for the forecast request was last updated, in UTC.

startDateTimestring

The time this forecast started processing: a UTC datetime. It is only available if there are partial results available (i.e., the progress is between 0% and 100%, exclusively).

endDateTimestring

The time this forecast completed processing: a UTC datetime. It is only available if there are finished results available (i.e., the progress is 100%).

forecastStartDatestring date-time

The effective start date for the forecast results, with timezone information. It is either the start date in the request (if present) or the time at which the forecast started, but it can suffer some adjustments due to the availability of future traffic.

forecastEndDatestring date-time

The effective start date for the forecast results, with timezone information. It is the end date in the request, but it can suffer some adjustments due to the availability of future traffic.

resultStatus'success' | 'failure'

Whether an error happened while executing the forecast.

Example response

{
  "id": "1978ad40-97da-403e-ad5d-c3e71c75a593",
  "desc": "This forecast is still being processed. Partial results are available",
  "eta": "2022-11-17T21:48:37+00:00",
  "status": "partial",
  "progress": 33.3,
  "requestDateTime": "2023-07-19T16:24:46.648Z",
  "lastUpdateDateTime": "2023-07-19T16:24:46.648Z",
  "startDateTime": "2023-07-19T16:24:46.648Z",
  "endDateTime": "2023-06-29T13:57:32.321",
  "forecastStartDate": "2023-06-19T16:24:46.648Z",
  "forecastEndDate": "2023-07-19T16:24:46.648Z",
  "resultStatus": "success",
  "result": {
    "total": {
      "411981212": {
        "clicks": 0,
        "impressions": 50,
        "revenue": 1,
        "uniqueUsers": 34
      },
      "412081539": {
        "clicks": 0,
        "impressions": 0,
        "revenue": 0,
        "uniqueUsers": 0
      }
    },
    "grouped": [
      {
        "key": {
          "request.localDate": "2023-08-17"
        },
        "value": {
          "411981212": {
            "clicks": 0,
            "impressions": 46,
            "revenue": 2,
            "uniqueUsers": 32
          },
          "412081539": {
            "clicks": 0,
            "impressions": 0,
            "revenue": 0,
            "uniqueUsers": 0
          }
        }
      },
      {
        "key": {
          "request.localDate": "2023-08-18"
        },
        "value": {
          "411981212": {
            "clicks": 0,
            "impressions": 4,
            "revenue": 0,
            "uniqueUsers": 2
          },
          "412081539": {
            "clicks": 0,
            "impressions": 0,
            "revenue": 0,
            "uniqueUsers": 0
          }
        }
      }
    ]
  }
}