> ## Documentation Index
> Fetch the complete documentation index at: https://docs-v2.ard.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Post apiaviationtafparse



## OpenAPI

````yaml https://sahabah-prod.devops.arabiaweather.com/openapi.json post /api/aviation/taf/parse
openapi: 3.1.0
info:
  title: sahabah-api
  description: ''
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://sahabah-prod.devops.arabiaweather.com
    description: Production API server
  - url: https://sahabah-stg.devops.arabiaweather.com
    description: Staging API server
security: []
tags:
  - name: System
    description: System health and monitoring endpoints
  - name: Aviation
    description: Aviation data parsing endpoints
  - name: Weather
    description: Weather data and forecasting endpoints
  - name: Reports
    description: Forecast accuracy analysis and reporting endpoints
paths:
  /api/aviation/taf/parse:
    post:
      tags:
        - Aviation
      operationId: parse_taf
      parameters:
        - name: x-api-key
          in: header
          description: API key for authentication
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TafRequest'
        required: true
      responses:
        '200':
          description: Successfully parsed TAF
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse_TafResponse'
        '400':
          description: TAF parsing failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse_TafParsingErrorData'
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      security:
        - x-api-key: []
components:
  schemas:
    TafRequest:
      type: object
      required:
        - taf_code
      properties:
        taf_code:
          type: string
          example: >-
            TAF EGLL 150500Z 1506/1606 27010KT 8000 SCT030 TX20/1514Z TN10/1603Z
            TEMPO 1506/1509 25015G25KT 3000 SHRA BKN005 OVC010 PROB30 1518/1521
            1500 +TSRA BKN003CB RMK NO THUNDERSTORMS EXPECTED AFTER 22Z
    SuccessResponse_TafResponse:
      type: object
      required:
        - data
        - timestamp
        - request_id
        - build
      properties:
        build:
          type: string
        data:
          type: object
          required:
            - ast
          properties:
            ast:
              $ref: '#/components/schemas/Taf'
        request_id:
          type: string
        timestamp:
          type: string
          format: date-time
    ErrorResponse_TafParsingErrorData:
      type: object
      required:
        - type
        - detail
        - request_id
        - timestamp
        - build
      properties:
        build:
          type: string
        data:
          type: object
          required:
            - parsing_errors
            - count
          properties:
            count:
              type: integer
              minimum: 0
            parsing_errors:
              type: array
              items:
                $ref: '#/components/schemas/MetafError'
        detail:
          type: string
        request_id:
          type: string
        timestamp:
          type: string
          format: date-time
        type:
          type: string
    Taf:
      type: object
      required:
        - report_type
        - station
        - issue_time
        - validity_period
        - main
        - change_groups
      properties:
        change_groups:
          type: array
          items:
            $ref: '#/components/schemas/ChangeGroup'
        issue_time:
          $ref: '#/components/schemas/IssueTime'
        main:
          $ref: '#/components/schemas/MainTafSection'
        remarks:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Remarks'
        report_type:
          $ref: '#/components/schemas/ReportType'
        station:
          type: string
        validity_period:
          $ref: '#/components/schemas/ValidityPeriod'
    MetafError:
      type: object
      required:
        - span
        - expected
        - reason
      properties:
        expected:
          type: array
          items:
            type: string
        found:
          type:
            - string
            - 'null'
        reason:
          $ref: '#/components/schemas/ErrorReason'
        span:
          $ref: '#/components/schemas/Span'
    ChangeGroup:
      type: object
      required:
        - change_type
        - time
        - conditions
      properties:
        change_type:
          $ref: '#/components/schemas/ChangeGroupType'
        conditions:
          $ref: '#/components/schemas/ChangeConditions'
        time:
          $ref: '#/components/schemas/ChangeTime'
    IssueTime:
      type: object
      description: Represents the issue time of a TAF report in DDHHMMZ format
      required:
        - day
        - hour
        - minute
      properties:
        day:
          type: integer
          format: int32
          minimum: 0
        hour:
          type: integer
          format: int32
          minimum: 0
        minute:
          type: integer
          format: int32
          minimum: 0
    MainTafSection:
      type: object
      required:
        - wind
        - weather
        - sky_conditions
        - temperature_extremes
      properties:
        sky_conditions:
          type: array
          items:
            $ref: '#/components/schemas/SkyCondition'
        temperature_extremes:
          type: array
          items:
            $ref: '#/components/schemas/TemperatureExtreme'
        visibility:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Visibility'
        weather:
          type: array
          items:
            $ref: '#/components/schemas/Weather'
        wind:
          $ref: '#/components/schemas/Wind'
        wind_shear:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/WindShear'
    Remarks:
      type: object
      description: |-
        TAF Remarks section
        Format: RMK followed by free-text information
      required:
        - content
      properties:
        content:
          type: string
          description: Free-text remarks content
    ReportType:
      type: string
      enum:
        - Metar
        - Speci
        - Taf
        - TafAmended
        - TafCorrected
    ValidityPeriod:
      type: object
      description: |-
        Represents the validity period of a TAF report in DDHH/DDHH format

        - DD: Day of the month (01-31)
        - HH: Hour in UTC (00-23)
        - /: Separator between start and end

        Example: 1015/1023 means valid from 15Z on the 10th to 23Z on the 10th
      required:
        - start_day
        - start_hour
        - end_day
        - end_hour
      properties:
        end_day:
          type: integer
          format: int32
          minimum: 0
        end_hour:
          type: integer
          format: int32
          minimum: 0
        start_day:
          type: integer
          format: int32
          minimum: 0
        start_hour:
          type: integer
          format: int32
          minimum: 0
    ErrorReason:
      oneOf:
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - uncategorized
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - unexpected-end
        - type: object
          required:
            - value
            - type
          properties:
            type:
              type: string
              enum:
                - custom
            value:
              type: string
    Span:
      type: object
      required:
        - start
        - end
      properties:
        end:
          type: integer
          minimum: 0
        start:
          type: integer
          minimum: 0
    ChangeGroupType:
      type: string
      enum:
        - From
        - Becoming
        - Temporary
        - Probability30
        - Probability40
        - Probability30Temporary
        - Probability40Temporary
        - TemporaryProbability30
        - TemporaryProbability40
        - Probability30Becoming
        - Probability40Becoming
        - BecomingProbability30
        - BecomingProbability40
    ChangeConditions:
      type: object
      properties:
        sky_conditions:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/SkyCondition'
        temperature_extremes:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/TemperatureExtreme'
        visibility:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Visibility'
        weather:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Weather'
        wind:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Wind'
        wind_shear:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/WindShear'
    ChangeTime:
      oneOf:
        - type: object
          required:
            - Precise
          properties:
            Precise:
              type: object
              required:
                - day
                - hour
                - minute
              properties:
                day:
                  type: integer
                  format: int32
                  minimum: 0
                hour:
                  type: integer
                  format: int32
                  minimum: 0
                minute:
                  type: integer
                  format: int32
                  minimum: 0
        - type: object
          required:
            - Period
          properties:
            Period:
              type: object
              required:
                - start_day
                - start_hour
                - end_day
                - end_hour
              properties:
                end_day:
                  type: integer
                  format: int32
                  minimum: 0
                end_hour:
                  type: integer
                  format: int32
                  minimum: 0
                start_day:
                  type: integer
                  format: int32
                  minimum: 0
                start_hour:
                  type: integer
                  format: int32
                  minimum: 0
    SkyCondition:
      type: object
      description: Complete sky condition representing a single cloud layer or clear sky
      required:
        - cover
      properties:
        cloud_type:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CloudLayer'
              description: Optional cloud type (CB or TCU)
        cover:
          $ref: '#/components/schemas/SkyCover'
          description: Cloud coverage type
        height:
          type:
            - integer
            - 'null'
          format: int32
          description: |-
            Height of cloud base in feet above ground level (AGL)
            None for CLR, SKC when they don't include height
          minimum: 0
    TemperatureExtreme:
      type: object
      description: |-
        Temperature extremes forecast
        Format: TXTT/DDHHZ or TNTT/DDHHZ
      required:
        - temp_type
        - temperature
        - day
        - hour
      properties:
        day:
          type: integer
          format: int32
          description: Day when temperature is expected (01-31)
          minimum: 0
        hour:
          type: integer
          format: int32
          description: Hour when temperature is expected (00-23)
          minimum: 0
        temp_type:
          $ref: '#/components/schemas/TemperatureType'
          description: Type of temperature (maximum or minimum)
        temperature:
          type: integer
          format: int32
          description: Temperature in Celsius (negative temperatures use negative values)
    Visibility:
      oneOf:
        - type: string
          description: >-
            CAVOK - Ceiling And Visibility OK (visibility >= 10km, no clouds
            below 5000ft, no significant weather)
          enum:
            - Cavok
        - type: object
          description: Visibility in meters (e.g., "1200" = 1200 meters)
          required:
            - Meters
          properties:
            Meters:
              type: integer
              format: int32
              description: Visibility in meters (e.g., "1200" = 1200 meters)
              minimum: 0
        - type: object
          description: Visibility in statute miles (e.g., "3SM" = 3.0 statute miles)
          required:
            - StatuteMiles
          properties:
            StatuteMiles:
              type: number
              format: float
              description: Visibility in statute miles (e.g., "3SM" = 3.0 statute miles)
        - type: object
          description: >-
            Less than specified value in statute miles (e.g., "M1/4SM" = less
            than 0.25 SM)
          required:
            - LessThan
          properties:
            LessThan:
              type: number
              format: float
              description: >-
                Less than specified value in statute miles (e.g., "M1/4SM" =
                less than 0.25 SM)
        - type: object
          description: >-
            Greater than specified value in statute miles (e.g., "P6SM" =
            greater than 6.0 SM)
          required:
            - GreaterThan
          properties:
            GreaterThan:
              type: number
              format: float
              description: >-
                Greater than specified value in statute miles (e.g., "P6SM" =
                greater than 6.0 SM)
    Weather:
      type: object
      description: Complete weather group
      required:
        - phenomena
      properties:
        descriptor:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/WeatherDescriptor'
        intensity:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/WeatherIntensity'
        phenomena:
          type: array
          items:
            $ref: '#/components/schemas/WeatherPhenomenon'
    Wind:
      type: object
      required:
        - direction
        - speed
        - unit
        - is_calm
        - is_variable
        - is_high_speed
      properties:
        direction:
          $ref: '#/components/schemas/WindDirection'
        gust_speed:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        is_calm:
          type: boolean
        is_high_speed:
          type: boolean
          description: >-
            Indicates if wind speed was parsed using P99 format (extreme winds
            99+ knots)
        is_variable:
          type: boolean
        speed:
          type: integer
          format: int32
          minimum: 0
        unit:
          $ref: '#/components/schemas/Unit'
        variation:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Variation'
              description: Indicates if wind direction was parsed as variable (VRB)
    WindShear:
      type: object
      required:
        - height
        - direction
        - speed
        - unit
      properties:
        direction:
          type: integer
          format: int32
          minimum: 0
        height:
          $ref: '#/components/schemas/Height'
        speed:
          type: integer
          format: int32
          minimum: 0
        unit:
          $ref: '#/components/schemas/Unit'
    CloudLayer:
      type: string
      description: Cloud layer types
      enum:
        - Cumulonimbus
        - ToweringCumulus
    SkyCover:
      type: string
      description: Sky cover codes representing cloud coverage
      enum:
        - Few
        - Scattered
        - Broken
        - Overcast
        - Clear
        - SkyClear
        - NoSignificantClouds
        - VerticalVisibility
    TemperatureType:
      type: string
      description: Temperature extremes type
      enum:
        - Maximum
        - Minimum
    WeatherDescriptor:
      type: string
      description: Weather descriptors
      enum:
        - Shallow
        - Partial
        - Patches
        - LowDrifting
        - Blowing
        - Showers
        - Thunderstorm
        - Freezing
    WeatherIntensity:
      type: string
      description: Weather intensity and proximity qualifiers
      enum:
        - Light
        - Heavy
        - Vicinity
    WeatherPhenomenon:
      type: string
      description: Weather phenomena
      enum:
        - Drizzle
        - Rain
        - Snow
        - SnowGrains
        - IceCrystals
        - IcePellets
        - Hail
        - SmallHail
        - UnknownPrecipitation
        - Mist
        - Fog
        - Smoke
        - VolcanicAsh
        - Dust
        - Sand
        - Haze
        - Spray
        - DustWhirls
        - Squalls
        - FunnelCloud
        - Sandstorm
        - Duststorm
    WindDirection:
      oneOf:
        - type: object
          description: Fixed direction in degrees (0-360)
          required:
            - Fixed
          properties:
            Fixed:
              type: integer
              format: int32
              description: Fixed direction in degrees (0-360)
              minimum: 0
        - type: string
          description: Variable wind direction (VRB)
          enum:
            - Variable
        - type: string
          description: Calm winds (00000)
          enum:
            - Calm
    Unit:
      type: string
      enum:
        - KT
        - MPS
        - KPH
    Variation:
      type: object
      required:
        - from
        - to
      properties:
        from:
          type: integer
          format: int32
          minimum: 0
        to:
          type: integer
          format: int32
          minimum: 0
    Height:
      type: object
      required:
        - value
        - unit
      properties:
        unit:
          $ref: '#/components/schemas/HeightUnit'
        value:
          type: integer
          format: int32
          minimum: 0
    HeightUnit:
      type: string
      enum:
        - Feet

````