get:
  summary: List all available systems
  description: |-
    List or search all `System` resources available from this server endpoint.

    By default, only top level systems are included (i.e., subsystems are ommitted) unless the `parent` query parameter is set.

  tags:
    - Systems
  parameters:
    - $ref: ../parameters/idList.yaml
    - $ref: ../parameters/bbox.yaml
    - $ref: ../parameters/datetime.yaml
    - $ref: ../parameters/geom.yaml
    - $ref: ../parameters/keyword.yaml
    - $ref: ../parameters/parentIdList.yaml
    - $ref: ../parameters/procedureIdList.yaml
    - $ref: ../parameters/foiIdList.yaml
    - $ref: ../parameters/obsPropIdList.yaml
    - $ref: ../parameters/controlPropIdList.yaml
    #- $ref: '#/components/parameters/select'
    - $ref: ../parameters/recursive.yaml
      description: If true, instructs the server to include subsystems in the search results.
    - $ref: ../parameters/limit.yaml
  responses:
    '200':
      $ref: ../responses/systemCollection.yaml
    '400':
      $ref: ../responses/StandardResponses.yaml#/400
    '401':
      $ref: ../responses/StandardResponses.yaml#/401
    '403':
      $ref: ../responses/StandardResponses.yaml#/403
    '404':
      $ref: ../responses/StandardResponses.yaml#/404
    '5XX':
      $ref: ../responses/StandardResponses.yaml#/5XX

post:
  summary: Create a new system
  description: |-
    Add a new top-level `System` resource (i.e., the system will have no parent).
  tags:
    - Systems
  requestBody:
    $ref: ../requests/system.yaml
  responses:
    '201':
      $ref: ../responses/StandardResponses.yaml#/201
    '400':
      $ref: ../responses/StandardResponses.yaml#/400
    '401':
      $ref: ../responses/StandardResponses.yaml#/401
    '403':
      $ref: ../responses/StandardResponses.yaml#/403
    '404':
      $ref: ../responses/StandardResponses.yaml#/404
    '5XX':
      $ref: ../responses/StandardResponses.yaml#/5XX