> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shared-desk.pedda.digital/llms.txt
> Use this file to discover all available pages before exploring further.

# Search reports

> Search for reports based on the provided criteria.



## OpenAPI

````yaml post /api/search/reports
openapi: 3.0.1
info:
  title: Shared Desk System
  description: OpenApi documentation for Shared Desk System
  version: '1.0'
servers:
  - url: http://localhost
    description: Local Cors
  - url: http://localhost:8080
    description: Local
  - url: https://production.shared-desk.cloud
    description: Production
  - url: https://staging.shared-desk.cloud
    description: Staging
security:
  - bearerAuth: []
  - cookieAuth: []
tags:
  - name: Stats
    description: Endpoints for retrieving statistics
  - name: User
    description: Endpoints for managing users
  - name: Password
    description: API for password reset
  - name: Authentication
    description: API for authentication
  - name: Search
    description: >-
      Advanced search operations. Allows to search for departments, rooms and
      desks.
  - name: Department
    description: API for department management
  - name: Equipment
    description: Endpoints for managing equipment
  - name: Desk
    description: API for desk management
  - name: Actuator
    description: Monitor and interact
    externalDocs:
      description: Spring Boot Actuator Web API Documentation
      url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
  - name: Room
    description: API for room management
  - name: Session
    description: Endpoints for managing user sessions
externalDocs:
  description: Public Service Documentation
  url: https://docs.shared-desk.cloud/api/introduction
paths:
  /api/search/reports:
    post:
      tags:
        - Search
      summary: Search reports
      description: Search for reports based on the provided criteria.
      operationId: searchReports
      parameters:
        - name: pageable
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchReportDTO'
        required: true
      responses:
        '200':
          description: Reports successfully retrieved
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PageReportResponseDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Bad credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                BadCredentialsExample:
                  description: BadCredentialsExample
                  value:
                    status: 401
                    error: Unauthorized
                    message: Full authentication is required to access this resource
                    details: []
                    path: /
                    timestamp: '2024-05-29T12:34:56'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                ForbiddenExample:
                  description: ForbiddenExample
                  value:
                    status: 403
                    error: Forbidden
                    message: Access denied
                    details: []
                    path: /api/
                    timestamp: '2024-05-29T12:34:56'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    Pageable:
      type: object
      properties:
        page:
          minimum: 0
          type: integer
          format: int32
        size:
          minimum: 1
          type: integer
          format: int32
        sort:
          type: array
          items:
            type: string
    SearchReportDTO:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        reportedBy:
          type: string
          format: uuid
        department:
          type: string
          format: uuid
        room:
          type: string
          format: uuid
        desk:
          type: string
          format: uuid
        equipment:
          type: string
          format: uuid
    PageReportResponseDTO:
      type: object
      properties:
        totalElements:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            $ref: '#/components/schemas/ReportResponseDTO'
        number:
          type: integer
          format: int32
        sort:
          type: array
          items:
            $ref: '#/components/schemas/SortObject'
        first:
          type: boolean
        last:
          type: boolean
        numberOfElements:
          type: integer
          format: int32
        pageable:
          $ref: '#/components/schemas/PageableObject'
        empty:
          type: boolean
    ApiError:
      type: object
      properties:
        timestamp:
          type: string
          example: '2024-05-29T12:34:56'
        status:
          type: integer
          format: int32
        error:
          type: string
        message:
          type: string
        details:
          type: array
          example: []
          items:
            type: object
            example: []
        path:
          type: string
          example: /api/?
    ReportResponseDTO:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        description:
          type: string
        reportedBy:
          type: string
          format: uuid
        departmentId:
          type: string
          format: uuid
        roomId:
          type: string
          format: uuid
        deskId:
          type: string
          format: uuid
        equipmentId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
    SortObject:
      type: object
      properties:
        direction:
          type: string
        nullHandling:
          type: string
        ascending:
          type: boolean
        property:
          type: string
        ignoreCase:
          type: boolean
    PageableObject:
      type: object
      properties:
        offset:
          type: integer
          format: int64
        sort:
          type: array
          items:
            $ref: '#/components/schemas/SortObject'
        pageSize:
          type: integer
          format: int32
        pageNumber:
          type: integer
          format: int32
        paged:
          type: boolean
        unpaged:
          type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    cookieAuth:
      type: apiKey
      name: Authorization
      in: cookie

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.