# Forecast model

TIP

On the client/server side the API is exposed using the Feathers isomorphic API (opens new window) and the Feathers common database query API (opens new window)

Weacast exposes the available forecast model instances found in the configuration at startup through the forecasts service, as a consequence the configuration file exposes the data model. Although only web sockets are usually used on the client side, both the REST (opens new window) and the Socket (opens new window) interfaces are configured.

For example you can request the available forecasts like this:

import app from 'src/api'

app.getService('forecasts').find()
.then(response => {
  response.data.forEach(forecast => {
    // Do something with the current forecast model
  })
})

create, update, patch, remove methods are only allowed from the server side, clients can only getand find forecasts

# Data model

The common data model of a forecast model instance as used by the API is detailed here.

# Forecast model hooks

The following hooks are executed on the Forecast model service: Forecast hooks