Forecasts

Latest Forecast

Provides the latest forecast for a model. Returns a response with an HTTP status code of 404 in the event that no forecasts are available.

GET /models/{model-id-or-name}/latest-forecast

Request Example

See Headers for request header details.

$ curl -X GET http://model.api.wdtinc.com/models/weatherops-global/latest-forecast

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
{
  "initTime": "2017-12-19T00:00:00Z",
  "model": "/models/c8dc9720-3011-11e7-affd-0a7752e6ac78",
  "expirationTime": "2017-12-26T11:11:17Z",
  "id": "6e3814c6-9572-564a-be47-f4d527879157",
  "createTime": "2017-12-19T11:11:17Z"
}

Forecast List

This provides a list of available forecasts from a particular model.

GET /models/{model-id-or-name}/forecasts

Optional Parameters

The default response contains all available forecasts for the model in ascending order.

Name Type Description Accepted Values / Range Example
start string UTC start time (ISO8601) any valid timestamp 2016-09-01T00:00:00Z
end string UTC end time (ISO8601) any valid timestamp 2016-09-02T00:00:00Z
limit number max number of results any positive integer 3
sort string sort order asc, desc asc

Request Examples

See Headers for request header details.

$ curl -X GET http://model.api.wdtinc.com/models/c8dc9720-3011-11e7-affd-0a7752e6ac78/forecasts
$ curl -X GET http://model.api.wdtinc.com/models/weatherops-global/forecasts

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
[
  {
    "initTime": "2017-12-19T00:00:00Z",
    "model": "/models/c8dc9720-3011-11e7-affd-0a7752e6ac78",
    "expirationTime": "2017-12-26T11:11:17Z",
    "id": "6e3814c6-9572-564a-be47-f4d527879157",
    "createTime": "2017-12-19T11:11:17Z"
  },
  {
    "initTime": "2017-12-18T12:00:00Z",
    "model": "/models/c8dc9720-3011-11e7-affd-0a7752e6ac78",
    "expirationTime": "2017-12-25T22:35:48Z",
    "id": "aaf13651-2866-57c5-843e-39ac2e46292a",
    "createTime": "2017-12-18T22:35:48Z"
  }
]

Forecast Information

This provides information about a particular forecast.

GET /forecasts/{forecast-id}

Request Examples

See Headers for request header details.

$ curl -X GET http://model.api.wdtinc.com/forecasts/6e3814c6-9572-564a-be47-f4d527879157

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
{
  "initTime": "2017-12-19T00:00:00Z",
  "model": "/models/c8dc9720-3011-11e7-affd-0a7752e6ac78",
  "expirationTime": "2017-12-26T11:11:17Z",
  "id": "6e3814c6-9572-564a-be47-f4d527879157",
  "createTime": "2017-12-19T11:11:17Z"
}