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

# Get server shifts

> Get paginated list of shifts for a server. Requires authentication.



## OpenAPI

````yaml GET /server/shifts
openapi: 3.0.0
info:
  contact: {}
  description: Melonlys Public API
  termsOfService: http://melonly.xyz/terms
  title: Melonly API
  version: '1.0'
servers:
  - url: https://api.melonly.xyz/api/v1
security: []
paths:
  /server/shifts:
    get:
      tags:
        - shifts
      summary: Get server shifts
      description: Get paginated list of shifts for a server. Requires authentication.
      parameters:
        - description: Page number
          in: query
          name: page
          schema:
            type: integer
            minimum: 1
            default: 1
        - description: Items per page
          in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
      responses:
        '200':
          description: successfully retrieved paginated shifts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ShiftListResponse'
        '400':
          description: invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.BadRequestResponse'
        '401':
          description: authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.UnauthorizedResponse'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.InternalServerErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    models.ShiftListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/models.ShiftAPIResponse'
          type: array
        page:
          example: 1
          type: integer
        pageSize:
          example: 10
          type: integer
        total:
          example: 100
          type: integer
        totalPages:
          example: 10
          type: integer
      type: object
    models.BadRequestResponse:
      properties:
        error:
          example: invalid request parameters
          type: string
      type: object
    models.UnauthorizedResponse:
      properties:
        error:
          example: authorization header is required
          type: string
      type: object
    models.InternalServerErrorResponse:
      properties:
        error:
          example: internal server error
          type: string
      type: object
    models.ShiftAPIResponse:
      properties:
        autoEnd:
          type: boolean
        breakTimestamps:
          items:
            type: object
          type: array
        createdAt:
          type: integer
        endedAt:
          type: integer
        endedBy:
          type: string
        id:
          type: string
        memberId:
          type: string
        serverId:
          type: string
        type:
          type: string
        wave:
          type: integer
      type: object
  securitySchemes:
    BearerAuth:
      description: Type "Bearer" followed by a space and the API token.
      in: header
      name: Authorization
      type: apiKey

````