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

# Get all past events

> Retrieves a list of events that have already ended.
- **For Administrators and Managers:** Returns all past events, including hidden ones (`is_visible: false`).
- **For regular Users and anonymous Guests:** Returns only past events that were publicly visible (`is_visible: true`).




## OpenAPI

````yaml api-reference/openapi.json get /api/events/past
openapi: 3.0.0
info:
  title: Tandem IT API
  version: 1.0.0
  description: API for tandem it backend
servers:
  - url: https://tandem.hlofiys.xyz
    description: Production server
security: []
tags:
  - name: Documentation
    description: API documentation endpoint
paths:
  /api/events/past:
    get:
      tags:
        - Events
      summary: Get all past events
      description: >
        Retrieves a list of events that have already ended.

        - **For Administrators and Managers:** Returns all past events,
        including hidden ones (`is_visible: false`).

        - **For regular Users and anonymous Guests:** Returns only past events
        that were publicly visible (`is_visible: true`).
      operationId: getPastEvents
      responses:
        '200':
          description: Successful response. Returns an array of past events.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Event'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Event:
      type: object
      required:
        - event_id
        - name
        - description
        - start_time
        - end_time
        - max_bookings_per_user
        - preview_image_url
        - is_visible
        - schedule
        - hall_id
      properties:
        event_id:
          type: integer
          format: int64
        name:
          type: string
          description: Event name
        description:
          type: string
          description: Event description
        start_time:
          type: string
          format: date-time
          description: Event start time
        end_time:
          type: string
          format: date-time
          description: Event end time
        max_bookings_per_user:
          type: integer
          description: The maximum number of seats a single user can book for this event
          default: 1
        preview_image_url:
          type: string
          description: Link to download the event preview image
        is_visible:
          type: boolean
          description: >-
            Controls whether the event is displayed on the public-facing event
            list
          default: false
        schedule:
          type: array
          items:
            $ref: '#/components/schemas/ScheduleItem'
        hall_id:
          type: integer
          format: int64
          description: Unique hall ID
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ScheduleItem:
      type: object
      required:
        - time
        - description
      properties:
        time:
          type: string
          description: Time of the schedule item (for example, '15:00')
          example: '15:00'
        description:
          type: string
          description: Description of the schedule item

````