asyncapi: 2.6.0
info:
  title: "OGC API - Connected Systems - Part 2: Dynamic Data"
  version: 0.0.1
  description: Pub/sub interface for OGC API - Connected Systems


channels:

  systems/{systemId}/events:
    parameters:
      systemId:
        $ref: ./parameters/systemId.yaml
    subscribe:
      summary: Subscribe for events from a specific system
      message:
        name: system_event
        title: System Event
        contentType: application/sml+json
        payload:
          $ref: ../openapi/schemas/json/systemEvent.json
    publish:
      summary: Publish events for a specific system
      message:
        name: system_event
        title: System Event
        contentType: application/sml+json
        payload:
          $ref: ../openapi/schemas/json/systemEvent.json


  systems/events:
    parameters:
      systemId:
        $ref: ./parameters/systemId.yaml
    subscribe:
      summary: Subscribe for events from all systems
      message:
        name: system_event
        title: System Event
        contentType: application/sml+json
        payload:
          $ref: ../openapi/schemas/json/systemEvent.json


  datastreams/{dataStreamId}/observations:
    parameters:
      dataStreamId:
        $ref: ./parameters/dataStreamId.yaml
    subscribe:
      summary: Subscribe for observations from a specific datastream
      message:
        name: observation
        title: Observation
        contentType: application/om+json
        payload:
          $ref: ../openapi/schemas/json/observation.json
    publish:
      summary: Publish observations in a specific datastream
      message:
        name: observation
        title: Observation
        contentType: application/om+json
        payload:
          $ref: ../openapi/schemas/json/observation.json


  controls/{controlStreamId}/commands:
    parameters:
      controlStreamId:
        $ref: ./parameters/controlStreamId.yaml
    subscribe:
      summary: Subscribe for commands from a specific control stream
      message:
        name: command
        title: Command
        contentType: application/cmd+json
        payload:
          $ref: ../openapi/schemas/json/command.json
    publish:
      summary: Publish commands in a specific control stream
      message:
        name: command
        title: Command
        contentType: application/cmd+json
        payload:
          $ref: ../openapi/schemas/json/command.json


  controls/{controlStreamId}/commands/{cmdId}/status:
    parameters:
      controlStreamId:
        $ref: ./parameters/controlStreamId.yaml
      cmdId:
        $ref: ./parameters/cmdId.yaml
    subscribe:
      summary: Subscribe for commands from a specific control stream
      message:
        name: command
        title: Command
        contentType: application/cmd+json
        payload:
          $ref: ../openapi/schemas/json/commandStatus.json
    publish:
      summary: Publish commands in a specific control stream
      message:
        name: command
        title: Command
        contentType: application/cmd+json
        payload:
          $ref: ../openapi/schemas/json/commandStatus.json