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

get:
  summary: List command status reports
  description: |-
    List or search all status reports associated to a given command
  tags:
    - Commands
  parameters:
    - $ref: ../../../part1/openapi/parameters/idList.yaml
    - $ref: ../parameters/reportTime.yaml
    - $ref: ../parameters/statusCodeList.yaml
    #- $ref: '#/components/parameters/select'
    - $ref: ../../../part1/openapi/parameters/limit.yaml
  responses:
    '200':
      $ref: ../responses/commandStatusCollection.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

post:
  summary: Add a command status report
  description: |-
    Add a new status report related to a specific command.
  tags:
    - Commands
  requestBody:
    $ref: ../requests/commandStatus.yaml
  responses:
    '201':
      $ref: ../../../part1/openapi/responses/StandardResponses.yaml#/201
    '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