> ## 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 a event by ID

> Retrieves details for a single event. 
- If accessed by an administrator and manager, it will return the event even if it is hidden.
- For all other users (including anonymous guests), it will only return the event if it is marked as visible.




## OpenAPI

````yaml api-reference/openapi.json get /api/events/{event_id}
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/{event_id}:
    parameters:
      - name: event_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
    get:
      tags:
        - Events
      summary: Get a event by ID
      description: >
        Retrieves details for a single event. 

        - If accessed by an administrator and manager, it will return the event
        even if it is hidden.

        - For all other users (including anonymous guests), it will only return
        the event if it is marked as visible.
      operationId: getEventById
      responses:
        '200':
          description: >-
            Successful response. Contains complete information about the event
            corresponding to the specified ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '404':
          description: The event with the specified ID was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '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

````