parameters:
  - $ref: ../parameters/dataStreamId.yaml

get:
  summary: Get a datastream by ID
  description: 
  tags:
    - Data Streams
  #parameters:
  #  - $ref: '#/components/parameters/select'
  responses:
    '200':
      $ref: ../responses/dataStream.yaml
    '400':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/400
    '401':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/401
    '403':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/403
    '404':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/404
    '5XX':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/5XX

put:
  summary: Update a datastream
  description: 
  tags:
    - Data Streams
  requestBody:
    $ref: ../requests/dataStream.yaml
  responses:
    '204':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/204_PUT
    '400':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/400
    '401':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/401
    '403':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/403
    '404':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/404
    '5XX':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/5XX

delete:
  summary: Delete a datastream
  description: |-
    This will delete the datastream and remove it from all collections it is associated to.

    If the `cascade` parameter is used, all associated observations are also deleted.
  tags:
    - Data Streams
  parameters:
    - $ref: ../../../part1/openapi/parameters/cascade.yaml
  responses:
    '204':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/204_DELETE
    '400':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/400
    '401':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/401
    '403':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/403
    '404':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/404
    '409':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/409_DELETE
    '5XX':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/5XX