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/model/weatherops-global/latest-forecast

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
{
  "id": "9318fe5c-2ea8-4c5c-b930-4ae81a89776f",
  "initTime": "2016-09-01T00:00:00Z",
  "variables": "/forecasts/9318fe5c-2ea8-4c5c-b930-4ae81a89776f/variables",
  "model": "/models/7d8f1c29-35cd-4028-b034-509fcf48cdf0"
}

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/7d8f1c29-35cd-4028-b034-509fcf48cdf0/forecasts
$ curl -X GET http://model.api.wdtinc.com/models/tropical-gfe/forecasts

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
[
  {
    "id": "9318fe5c-2ea8-4c5c-b930-4ae81a89776f",
    "initTime": "2016-09-01T00:00:00Z",
    "variables": "/forecasts/9318fe5c-2ea8-4c5c-b930-4ae81a89776f/variables",
    "model": "/models/7d8f1c29-35cd-4028-b034-509fcf48cdf0"
  },
  {
    "id": "92267afc-1e72-4408-a94b-62b40881ea4e",
    "initTime": "2016-09-01T12:00:00Z",
    "variables": "/forecasts/92267afc-1e72-4408-a94b-62b40881ea4e/variables",
    "model": "/models/7d8f1c29-35cd-4028-b034-509fcf48cdf0"
  }
]

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/9318fe5c-2ea8-4c5c-b930-4ae81a89776f

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
{
  "id": "9318fe5c-2ea8-4c5c-b930-4ae81a89776f",
  "initTime": "2016-09-01T00:00:00Z",
  "variables": "/forecasts/9318fe5c-2ea8-4c5c-b930-4ae81a89776f/variables",
  "model": "/models/7d8f1c29-35cd-4028-b034-509fcf48cdf0"
}