malware on-demand start-user:
  return_type: NullAgentResponse
  help: Scan a user's home directory
  type: dict
  schema:
    user:
      type: string
      nullable: false
      help: Username to scan

malware on-demand stop-user:
  return_type: NullAgentResponse
  help: Stop a user's on-demand scan
  type: dict
  schema:
    user:
      type: string
      nullable: false
      help: Username

malware on-demand status-user:
  return_type: OnDemandUserScanStatusAgentResponse
  help: Check the status of the user's on-demand scan
  type: dict
  schema:
    user:
      type: string
      nullable: false
      help: Username

malware on-demand list-user:
  type: dict
  help: |
    List scans of a specific user.
    This request can be performed by any user, not just admins.
  return_type: OnDemandScanListAgentResponse
  schema:
    user:
      type: string
      nullable: false
      help: Username
    since:
      type: integer
      coerce: int
      default: 0
      help: Show scans started after this unix timestamp.
    to:
      type: integer
      coerce: int
      default_setter: now
      help: Show scans started before this unix timestamp.
    limit:
      type: integer
      coerce: int
      default: 50
      help: Page size
    offset:
      type: integer
      coerce: int
      default: 0
      help: Page offset
    order_by:
      type: list
      schema:
        type: order_by
        coerce: order_by
      nullable: true
      help: |
        List of fields to order by, each followed by a `+` (ascending) or `-` (descending).
        E.g. `["started-"]` would order by `started` descending.
