openapi: 3.0.0
info:
  title: Science v2
  description: The DPIRD Science v2 API.
  termsOfService: 'https://www.agric.wa.gov.au/n/6732'
  version: 1.5.0
security:
  - ApiKeyAuth: []
paths:
  /v2/science/stations:
    get:
      operationId: getStations
      summary: Returns a list of stations that can be used with the Science API.
      parameters:
        - &ref_25
          name: stationCode
          in: query
          description: >-
            A comma separated list of station codes. Limits the stations which
            will be returned.
          required: false
          schema:
            type: string
          example: 'SP,AN001'
        - &ref_10
          name: offset
          in: query
          description: >-
            The pagination `offset` parameter specifies the first entry to
            return from a collection.
          required: false
          schema:
            type: number
            default: 0
          example: 0
        - &ref_24
          name: limit
          in: query
          description: >-
            The pagination `limit` parameter restricts the number of entries
            returned.
          required: false
          schema:
            type: number
            default: 0
          example: 25
        - &ref_11
          name: select
          description: A comma separated list of fields to include in the result.
          in: query
          schema:
            type: string
        - &ref_12
          name: sort
          in: query
          description: >-
            A comma separated list of fields to sort by. Defaults to ascending.
            Prepend '-' for descending.
          schema:
            type: string
        - &ref_13
          name: group
          in: query
          description: A predefined group of stations. The accepted values are 'rtd', 'yellowspot', 'yshistory', 'rangelands', 'blackspot'. Defaults to rtd.
          required: false
          schema:
            type: string
          example: yellowspot
        - &ref_14
          name: state
          in: query
          description: >-
            Filter the stations by state. By default, all states are returned.
            Available values are 'all', 'wa', 'sa', 'nsw', 'vic', 'qld', 'tas',
            'nt'
          required: false
          schema:
            type: string
          example: wa
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata: &ref_0
                    description: >-
                      A wrapper on all responses providing useful information
                      related to the API call.
                    type: object
                    properties:
                      status:
                        type: number
                        description: The HTTP response code.
                        example: 200
                      links:
                        type: array
                        description: A series of links related to the endpoint.
                        items: &ref_1
                          type: object
                          properties:
                            href:
                              type: string
                              description: Specifies the URL of the page the link goes to.
                              example: 'https://api.dpird.wa.gov.au/path/to/resource'
                            rel:
                              type: string
                              description: >-
                                Specifies the relationship between the current
                                document and the linked document.
                              example: self
                  collection:
                    type: array
                    items: &ref_17
                      type: object
                      properties:
                        stationCode:
                          description: The unique identifier for a station. Case sensitive.
                          type: string
                          example: SP
                        stationName:
                          type: string
                          description: The human readable name of the weather station.
                          example: South Perth
                        latitude:
                          description: 'The stations latitude, for displaying on a map.'
                          type: number
                          example: -31.953512
                        longitude:
                          description: 'The stations longitude, for displaying on a map.'
                          type: number
                          example: 115.857048
                        owner:
                          type: string
                          description: The owner of the weather station.
                          example: >-
                            Department of Primary Industry and Regional
                            Development
                        state:
                          type: string
                          description: The Australian state the station resides in.
                          enum:
                            - NSW
                            - NT
                            - QLD
                            - SA
                            - TAS
                            - VIC
                            - WA
                          example: WA
        '400': &ref_3
          description: The request was invalid
          content:
            application/json:
              schema: &ref_2
                type: object
                properties:
                  metadata: *ref_0
                  error:
                    type: object
                    properties:
                      code:
                        type: number
                        description: The HTTP status code
                        example: 404
                      message:
                        type: string
                        description: A description of the error
                        example: Not Found
                      links:
                        type: array
                        items: *ref_1
        '401': &ref_4
          description: Unauthorised
          content:
            application/json:
              schema: *ref_2
        '403': &ref_5
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: number
                    description: The message description
                    example: No API key found in request
        '429': &ref_6
          description: Too many requests
          content:
            application/json:
              schema: *ref_2
        '500': &ref_7
          description: An unexpected error occurred while processing the request
          content:
            application/json:
              schema: *ref_2
        '503': &ref_8
          description: The service is temporarily unavailable.
          content:
            application/json:
              schema: *ref_2
        '504': &ref_9
          description: The service is temporarily unavailable.
          content:
            application/json:
              schema: *ref_2
  '/v2/science/stations/{stationCode}':
    get:
      operationId: getStation
      summary: >-
        Get the metadata for a specific station that can be used with the
        Science API.
      parameters:
        - name: stationCode
          in: path
          required: true
          description: A single station code.
          schema:
            type: string
          example: SP
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata: *ref_0
                  data: &ref_18
                    type: object
                    properties:
                      stationCode:
                        description: The unique identifier for a station. Case sensitive.
                        type: string
                        example: SP
                      stationName:
                        type: string
                        description: The human readable name of the weather station.
                        example: South Perth
                      latitude:
                        description: 'The stations latitude, for displaying on a map.'
                        type: number
                        example: -31.953512
                      longitude:
                        description: 'The stations longitude, for displaying on a map.'
                        type: number
                        example: 115.857048
                      owner:
                        type: string
                        description: The owner of the weather station.
                        example: >-
                          Department of Primary Industry and Regional
                          Development
                      state:
                        type: string
                        description: The Australian state the station resides in.
                        enum:
                          - NSW
                          - NT
                          - QLD
                          - SA
                          - TAS
                          - VIC
                          - WA
                        example: WA
                      startYear:
                        type: number
                        description: The year the station was started.
                        example: 2001
                      endYear:
                        type: number
                        description: >-
                          The year the station was turned off. Null if still
                          running.
                        example: 2016
        '400': *ref_3
        '401': *ref_4
        '403': *ref_5
        '429': *ref_6
        '500': *ref_7
        '503': *ref_8
        '504': *ref_9
  /v2/science/stations/nearby:
    get:
      operationId: getNearbyStations
      summary: Returns a list of stations that can be used with the Science API.
      parameters:
        - &ref_26
          name: latitude
          in: query
          description: The latitude of the search location in decimal.
          required: true
          schema:
            type: number
          example: -31.953512
        - &ref_27
          name: longitude
          in: query
          description: The longitude of the search location in decimal.
          required: true
          schema:
            type: number
          example: 115.857048
        - &ref_28
          name: radius
          in: query
          description: >-
            The maximum radius to search in in kilometers. Use this to define
            "nearby"
          required: false
          schema:
            type: number
            default: 100
          example: 100
        - *ref_10
        - name: limit
          in: query
          description: >-
            The pagination `limit` parameter restricts the number of entries
            returned.
          required: false
          schema:
            type: number
            default: 5
          example: 25
        - *ref_11
        - *ref_12
        - *ref_13
        - *ref_14
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata: *ref_0
                  collection:
                    type: array
                    items: &ref_19
                      type: object
                      properties:
                        stationCode:
                          description: The unique identifier for a station. Case sensitive.
                          type: string
                          example: SP
                        stationName:
                          type: string
                          description: The human readable name of the weather station.
                          example: South Perth
                        latitude:
                          description: 'The stations latitude, for displaying on a map.'
                          type: number
                          example: -31.953512
                        longitude:
                          description: 'The stations longitude, for displaying on a map.'
                          type: number
                          example: 115.857048
                        owner:
                          type: string
                          description: The owner of the weather station.
                          example: >-
                            Department of Primary Industry and Regional
                            Development
                        state:
                          type: string
                          description: The Australian state the station resides in.
                          enum:
                            - NSW
                            - NT
                            - QLD
                            - SA
                            - TAS
                            - VIC
                            - WA
                          example: WA
                        distance:
                          type: number
                          description: >-
                            The distance from the location as the bird flies in
                            kilometers.
                          example: 10.1
        '400': *ref_3
        '401': *ref_4
        '403': *ref_5
        '429': *ref_6
        '500': *ref_7
        '503': *ref_8
        '504': *ref_9
  /v2/science/potential-yield:
    get:
      operationId: getPotentialYield
      summary: >-
        Returns the potential yield values as calculated using the French &
        Schultz potential yield model.
      description: >-
        <ul> <li>The potential yield endpoint uses seasonal rainfall and decile
        finishes, calculated from historical data, to calculate the maximum
        wheat yield possible in the absence of any other constraints.</li>
        <li>Potential yield can be used as a tool in the seasonal decision
        making process.</li> <li>Estimates of potential wheat yield are obtained
        using the French & Schultz potential yield model: <ul> <li> Yield
        (tonnes/ha) = WUE * (stored soil water + growing season rainfall -
        evaporation)</li> </ul></li> <li>WUE is the abbreviation for water use
        efficiency and growing season rainfall is usually calculated from April
        to October, inclusive.</li> <li>Stored soil water at the start of the
        growing season is estimated as one third of summer rainfall.</li>
        <li>More information on the model available at <a
        href="https://www.agric.wa.gov.au/climate-weather/potential-yield-tool">the
        Potential Yield Tool on the DPIRD website</a></li> </ul>
      parameters:
        - name: stationCode
          in: query
          required: false
          description: >-
            A single station code. Alternatively a latitude or longitude can be
            supplied.
          schema:
            type: string
          example: SP
        - name: latitude
          required: false
          in: query
          description: >-
            A decimal latitude. Supplied with a longitude this can replace
            station code. The lat/long will be used to calculate the closest
            weather station.
          schema:
            type: number
            format: float
        - name: longitude
          required: false
          in: query
          description: >-
            A decimal longitude. Supplied with a latitude this can replace
            station code. The lat/long will be used to calculate the closest
            weather station.
          schema:
            type: number
            format: float
        - name: summerStartDate
          in: query
          required: false
          description: >-
            The date that summer starts on. Defaults to 1/11 of the previous
            year.
          schema:
            type: string
          example: '2016-11-01'
        - name: growingSeasonStartDate
          in: query
          required: false
          description: >-
            The date that the growing season starts. Defaults to 1/4 of the
            current year.
          schema:
            type: string
            format: date
          example: '2017-04-01'
        - name: growingSeasonEndDate
          required: false
          in: query
          description: >-
            The end date for the growing season. Defaults to 31/10 of the
            current year.
          schema:
            type: string
            format: date
          example: '2017-10-31'
        - name: forecastDate
          required: false
          in: query
          description: >-
            The date to conduct the projections from. Can be used to see
            historical predictions. Defaults to the current date.
          schema:
            type: string
            format: date
          example: '2017-05-01'
        - name: waterUseEfficiency
          required: false
          in: query
          description: The water use efficiency to use.
          schema:
            type: number
            default: 15
            minimum: 12
            maximum: 20
          example: 15
        - name: evaporation
          required: false
          in: query
          description: The evaporation.
          schema:
            type: number
            default: 110
            minimum: 90
            maximum: 120
          example: 110
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata: *ref_0
                  data: &ref_21
                    type: object
                    properties:
                      summary:
                        description: >-
                          A rainfall summary for the growing season and the last
                          summer.
                        type: object
                        properties:
                          summer:
                            description: The summer rainfall summary.
                            type: object
                            properties:
                              startDate:
                                description: The summer start date.
                                type: string
                                format: date
                                example: '2016-10-31'
                              endDate:
                                description: >-
                                  The end of the summer period (the day before
                                  the season starts)
                                type: string
                                format: date
                                example: '2017-03-31'
                              cumulativeRainfall:
                                description: >-
                                  The amount of rain that has fallen during the
                                  summer period.
                                type: number
                                example: 110.2
                              decile:
                                description: >-
                                  The historical decile this summers rainfall
                                  falls into.
                                type: number
                                minimum: 1
                                maximum: 9
                                example: 4
                          season:
                            description: The seasonal rainfall summary.
                            type: object
                            nullable: true
                            properties:
                              startDate:
                                description: The data the season starts
                                type: string
                                format: date
                                example: '2017-04-01'
                              endDate:
                                description: >-
                                  The date the season ends, or the current date
                                  if currently within the season.
                                type: string
                                format: date
                                example: '2017-10-31'
                              cumulativeRainfall:
                                description: >-
                                  The amount of rain that has fallen between the
                                  start and end dates.
                                type: number
                                example: 110.2
                              decile:
                                description: >-
                                  Given the current cumulative rainfall, this is
                                  the historical decile the rainfall would fit
                                  into.
                                type: number
                                minimum: 1
                                maximum: 9
                                example: 5
                      potentialYield:
                        description: >-
                          The potential yield and expected rainfall for the
                          season, by decile.
                        type: array
                        items:
                          type: object
                          properties:
                            decile:
                              description: The decile from 1 to 9
                              type: number
                              minimum: 1
                              maximum: 9
                              example: 1
                            projectedRainfall:
                              description: The projected rainfall for the decile in mm.
                              type: number
                              example: 123.8
                            potentialYield:
                              description: The potential yield in tonnes/ha.
                              type: number
                              example: 1.7
        '400': *ref_3
        '401': *ref_4
        '403': *ref_5
        '404': &ref_15
          description: The specified resource was not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The message description
                    example: No API found with those values
        '422': &ref_16
          description: Unprocessable entity
          content:
            application/json:
              schema: *ref_2
        '429': *ref_6
        '500': *ref_7
        '503': *ref_8
        '504': *ref_9
  /v2/science/soilwater:
    get:
      operationId: getSoilWater
      summary: >-
        Returns the amount of water in the soil depending on the rainfall
        recieved and the type of soil.
      parameters:
        - name: stationCode
          in: query
          required: false
          description: >-
            A single station code. Alternatively a latitude or longitude can be
            supplied.
          schema:
            type: string
          example: SP
        - name: latitude
          required: false
          in: query
          description: >-
            A decimal latitude. Supplied with a longitude this can replace
            station code. The lat/long will be used to calculate the closest
            weather station.
          schema:
            type: number
            format: float
        - name: longitude
          required: false
          in: query
          description: >-
            A decimal longitude. Supplied with a latitude this can replace
            station code. The lat/long will be used to calculate the closest
            weather station.
          schema:
            type: number
            format: float
        - name: startDate
          in: query
          required: false
          description: The start date for the period.
          schema:
            type: string
            format: date
          example: '2017-04-01'
        - name: endDate
          required: false
          in: query
          description: The end date for the period.
          schema:
            type: string
            format: date
          example: '2017-10-31'
        - name: soilType
          required: true
          in: query
          description: A code for a type of soil, it accepts all for all soil types or multiple types by comma separating the values. Available soil types are gravel, shallow-soil, sand, sandy-earth, shallow-sandy-duplex, deep-sandy-duplex, shallow-loamy-duplex, deep-loamy-duplex, loamy-earth, clay.
          schema:
            type: string
          example: gravel
        - name: faoInitialisationDays
          required: false
          in: query
          description: >-
            Number of days in crop initialisation period, used in estimation of
            crop evapotranspiration.
          schema:
            type: number
            format: integer
            default: 15
          example: 15
        - name: faoInitialisationCropCoefficient
          required: false
          in: query
          description: >-
            Proportion of potential evaporation used by crop during
            initialisation period.
          schema:
            type: number
            format: float
            default: 0.05
          example: 0.05
        - name: faoDevelopmentDays
          required: false
          in: query
          description: >-
            Number of days in crop development period, used in estimation of
            crop evapotranspiration.
          schema:
            type: number
            format: integer
            default: 20
          example: 20
        - name: faoDevelopmentCropCoefficient
          required: false
          in: query
          description: >-
            Proportion of potential evaporation used by crop during development
            period.
          schema:
            type: number
            format: float
            default: 0.1
          example: 0.1
        - name: faoMidSeasonDays
          required: false
          in: query
          description: >-
            Number of days in crop mid-seasonperiod, used in estimation of crop
            evapotranspiration.
          schema:
            type: number
            format: integer
            default: 80
          example: 80
        - name: faoMidSeasonCropCoefficient
          required: false
          in: query
          description: >-
            Proportion of potential evaporation used by during mid-season
            period.
          schema:
            type: number
            format: float
            default: 0.45
          example: 0.45
        - name: faoLateSeasonDays
          required: false
          in: query
          description: >-
            Number of days in crop late-season period, used in estimation of
            crop evapotranspiration.
          schema:
            type: number
            format: integer
            default: 45
          example: 45
        - name: faoLateSeasonCropCoefficient
          required: false
          in: query
          description: >-
            Proportion of potential evaporation used by crop during late-season
            period.
          schema:
            type: number
            format: float
            default: 0.2
          example: 0.2
        - name: faoBreakOfSeason3Days25April
          required: false
          in: query
          description: >-
            The number of mm of rainfall after April 25th which triggers the
            break of season.
          schema:
            type: number
            default: 15
          example: 15
        - name: faoBreakOfSeason3Days5June
          required: false
          in: query
          description: >-
            The number of mm of rainfall after June 5th which triggers the break
            of season.
          schema:
            type: number
            format: integer
            default: 5
          example: 5
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata: *ref_0
                  data: &ref_20
                    type: object
                    properties:
                      soilWater:
                        description: the soil water data
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              description: The summer start date.
                              type: string
                              format: date
                              example: '2016-10-31'
                            rainfall:
                              description: The amount of rain that fell on the day.
                              type: number
                              example: 4.3
                            fallow:
                              description: The soil water in mm for a fallow paddock.
                              type: number
                              example: 3.5
                            crop:
                              description: The soil water in mm for a cropped padddock.
                              type: number
                              example: 1.6
        '400': *ref_3
        '401': *ref_4
        '403': *ref_5
        '404': *ref_15
        '422': *ref_16
        '429': *ref_6
        '500': *ref_7
        '503': *ref_8
        '504': *ref_9
  /v2/science/yellowspot:
    get:
      operationId: getYellowSpot
      description: Run the Moin or Chris Yellow Spot model.
      summary: Run the Moin or Chris Yellow Spot model.
      parameters:
        - name: stationCode
          in: query
          required: true
          description: A single station code as defined by the stations endpoint.
          schema:
            type: string
          example: SP
        - name: date
          in: query
          required: false
          description: >-
            The date to run the model for, in format YYYY-MM-DD. Defaults to the
            current day if not provided.
          schema:
            type: string
          example: '2020-12-21'
        - name: select
          in: query
          required: false
          description: >-
            Return only a part of the results. Options are 'moin', 'chris',
            'moinMaturation', 'moinModel', 'chrisMaturation', 'chrisModel'.
            Multiple options can be provided as a comma separated string ie.
            'moinMaturation,chrisMaturation'. By default all results are
            returned.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata: *ref_0
                  data: &ref_22
                    type: object
                    properties:
                      moin:
                        description: >-
                          Moin's model calculates the date of maturation of a
                          yellow spot primary infection assuming that days are
                          either suitable for maturation or not, based on daily
                          temperature and rainfall data.
                        type: object
                        properties:
                          maturation:
                            description: null
                            type: object
                            properties:
                              date:
                                description: >-
                                  Calculated date of maturity, if it has
                                  occurred.
                                type: string
                                format: date
                                example: '2017-10-31'
                              progress:
                                description: >-
                                  Current maturation as percentage of target as
                                  of the request date. If request date is the
                                  calculated date of maturity this will be 100%;
                                  if after it will be larger.
                                type: number
                                example: 21
                              target:
                                description: >-
                                  Number of suitable days required to reach
                                  maturation.
                                type: number
                                example: 24
                          model:
                            description: null
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  description: The date.
                                  type: string
                                  format: date
                                  example: '2017-10-31'
                                temperature:
                                  type: object
                                  properties:
                                    minimum:
                                      description: The minimum temperature for the day.
                                      type: number
                                      example: 24
                                    maximum:
                                      description: The maximum temperature for the day.
                                      type: number
                                      example: 40.6
                                    average:
                                      description: The average temperature for the day.
                                      type: number
                                      example: 24.3
                                    movingAverage:
                                      description: The moving average.
                                      type: number
                                      example: 25.3
                                rainfall:
                                  type: object
                                  properties:
                                    rain:
                                      description: The daily rainfall for the period
                                      type: number
                                      example: 0
                                    movingSum:
                                      description: The rainfall moving sum.
                                      type: number
                                      example: 0
                                suitable:
                                  description: null
                                  type: number
                                  example: 0
                                maturationProgress:
                                  description: null
                                  type: number
                                  example: 0
                      chris:
                        description: >-
                          Chris' model calculates the date of maturation of a
                          yellow spot primary infection assuming that days can
                          be fractionally suitable for maturation, depending on
                          how close the day temperature and rainfall values are
                          to optimal values.
                        type: object
                        properties:
                          maturation:
                            description: null
                            type: object
                            properties:
                              date:
                                description: null
                                type: string
                                format: date
                                example: '2017-10-31'
                              progress:
                                description: null
                                type: number
                                example: 21
                              target:
                                description: null
                                type: number
                                example: 24
                          model:
                            description: null
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  description: The date.
                                  type: string
                                  format: date
                                  example: '2017-10-31'
                                temperature:
                                  type: object
                                  properties:
                                    minimum:
                                      description: The minimum temperature for the day.
                                      type: number
                                      example: 14
                                    maximum:
                                      description: The maximum temperature for the day.
                                      type: number
                                      example: 40.6
                                    average:
                                      description: The average temperature for the day.
                                      type: number
                                      example: 22
                                    ppt:
                                      description: null
                                      type: null
                                      example: null
                                rainfall:
                                  type: object
                                  properties:
                                    rain:
                                      description: The daily rainfall for the period
                                      type: number
                                      example: 0
                                    average:
                                      description: null
                                      type: number
                                      example: 0
                                    averagePPT:
                                      description: null
                                      type: number
                                      example: 0
                                suitable:
                                  description: null
                                  type: number
                                  example: 0
                                maturationProgress:
                                  description: null
                                  type: number
                                  example: 0
        '400': *ref_3
        '401': *ref_4
        '403': *ref_5
        '404': *ref_15
        '422': *ref_16
        '429': *ref_6
        '500': *ref_7
        '503': *ref_8
        '504': *ref_9
  '/v2/science/rainfall/{stationCode}':
    get:
      operationId: getRainfallToDate
      summary: >-
        Returns the rainfall to date, historical rainfall data and projected
        rainfall data, depending on already received rainfall.
      parameters:
        - name: stationCode
          in: path
          required: true
          description: A single station code.
          schema:
            type: string
          example: SP
        - name: summerStartDate
          in: query
          required: false
          description: >-
            The date that summer starts on. Defaults to 1/11 of the previous
            year.
          schema:
            type: string
          example: '2016-11-01'
        - name: growingSeasonStartDate
          in: query
          required: false
          description: >-
            The date that the growing season starts. Defaults to 1/4 of the
            current year.
          schema:
            type: string
            format: date
          example: '2017-04-01'
        - name: growingSeasonEndDate
          required: false
          in: query
          description: >-
            The end date for the growing season. Defaults to 31/10 of the
            current year.
          schema:
            type: string
            format: date
          example: '2017-10-31'
        - name: forecastDate
          required: false
          in: query
          description: >-
            The date to conduct the projections from. Can be used to see
            historical predictions. Defaults to the current date.
          schema:
            type: string
            format: date
          example: '2017-05-01'
        - name: select
          in: query
          description: >-
            A comma separated list of fields to include in the result. These values are: 'forecastDate', 'summary', 'projectedSeasonalRainfall', 'currentSeasonalRainfall', 'historicalRainfall'
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata: *ref_0
                  data: &ref_23
                    type: object
                    properties:
                      summary:
                        description: >-
                          A rainfall summary for the growing season and the last
                          summer.
                        type: object
                        properties:
                          summer:
                            description: The summer rainfall summary.
                            type: object
                            properties:
                              startDate:
                                description: The summer start date.
                                type: string
                                format: date
                                example: '2016-10-31'
                              endDate:
                                description: >-
                                  The end of the summer period (the day before
                                  the season starts)
                                type: string
                                format: date
                                example: '2017-03-31'
                              cumulativeRainfall:
                                description: >-
                                  The amount of rain that has fallen during the
                                  summer period.
                                type: number
                                example: 110.2
                              decile:
                                description: >-
                                  The historical decile this summers rainfall
                                  falls into.
                                type: number
                                minimum: 1
                                maximum: 9
                                example: 4
                          season:
                            description: The seasonal rainfall summary.
                            type: object
                            nullable: true
                            properties:
                              startDate:
                                description: The data the season starts
                                type: string
                                format: date
                                example: '2017-04-01'
                              endDate:
                                description: >-
                                  The date the season ends, or the current date
                                  if currently within the season.
                                type: string
                                format: date
                                example: '2017-10-31'
                              cumulativeRainfall:
                                description: >-
                                  The amount of rain that has fallen between the
                                  start and end dates.
                                type: number
                                example: 110.2
                              decile:
                                description: >-
                                  Given the current cumulative rainfall, this is
                                  the historical decile the rainfall would fit
                                  into.
                                type: number
                                minimum: 1
                                maximum: 9
                                example: 5
                      currentSeasonalRainfall:
                        type: array
                        nullable: true
                        items:
                          type: object
                          properties:
                            date:
                              description: The date the rainfall occurred on.
                              type: string
                              format: date
                              example: '2017-04-10'
                            rainfall:
                              description: The rainfall that occurred on the given day.
                              type: number
                              example: 3.2
                            cumulative:
                              description: >-
                                The cumulative rainfall that has occurred so far
                                this season.
                              type: number
                              example: 129.1
                      projectedSeasonalRainfall:
                        nullable: true
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              description: The date of the projected rainfall.
                              type: string
                              format: date
                              example: '2017-05-10'
                            deciles:
                              description: The projected rainfall values by decile.
                              type: array
                              items:
                                type: object
                                properties:
                                  decile:
                                    description: The decile from 1 to 9
                                    type: number
                                    minimum: 1
                                    maximum: 9
                                    example: 1
                                  rainfall:
                                    description: The projected rainfall for the decile.
                                    type: number
                                    example: 12.3
                      historicalRainfall:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              description: >-
                                The month and day of the historical rainfall
                                deciles.
                              type: string
                              format: date-without-year
                              example: 05-10
                            deciles:
                              description: The projected rainfall values by decile.
                              type: array
                              items:
                                type: object
                                properties:
                                  decile:
                                    description: The decile from 1 to 9
                                    type: number
                                    minimum: 1
                                    maximum: 9
                                    example: 1
                                  rainfall:
                                    description: The projected rainfall for the decile.
                                    type: number
                                    example: '12.3'
        '400': *ref_3
        '401': *ref_4
        '403': *ref_5
        '404': *ref_15
        '422': *ref_16
        '429': *ref_6
        '500': *ref_7
        '503': *ref_8
        '504': *ref_9
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: API-KEY
  schemas:
    Metadata: *ref_0
    Link: *ref_1
    Error: *ref_2
    StationsStation: *ref_17
    Station: *ref_18
    NearbyStation: *ref_19
    SoilWater: *ref_20
    PotentialYield: *ref_21
    Yellowspot: *ref_22
    Rainfall: *ref_23
  responses:
    400BadRequest: *ref_3
    401Unauthorized: *ref_4
    403Forbidden: *ref_5
    404NotFound: *ref_15
    422UnprocessableEntity: *ref_16
    429TooManyRequests: *ref_6
    500InternalServerError: *ref_7
    503ServiceUnavailable: *ref_8
    504GatewayTimeout: *ref_9
  parameters:
    partialParam: *ref_11
    paginationOffsetParam: *ref_10
    paginationLimitParam: *ref_24
    sortParam: *ref_12
    stationCodeParam: *ref_25
    groupParam: *ref_13
    stateParam: *ref_14
    latitudeParam: *ref_26
    longitudeParam: *ref_27
    radiusParam: *ref_28
