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

# Current employee's month history: calendar cells, MTD

> Current employee's month history: calendar cells, MTD totals, insights



## OpenAPI

````yaml /api-reference/openapi.json get /api/attendance/history/month/{month}
openapi: 3.1.0
info:
  title: ontime API
  description: APIs for ontime.v2
  version: 1.0.0
servers:
  - url: https://app.ontime.hosai.app
    description: Production
security:
  - apiKey: []
paths:
  /api/attendance/history/month/{month}:
    get:
      tags:
        - Attendance
      summary: 'Current employee''s month history: calendar cells, MTD'
      description: 'Current employee''s month history: calendar cells, MTD totals, insights'
      operationId: getApiAttendanceHistoryMonthByMonth
      parameters:
        - in: path
          name: month
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  month:
                    type: string
                  days:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  isCurrentMonth:
                    type: boolean
                  workedDays:
                    type: number
                  expectedDays:
                    type: number
                  workedMinutes:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  expectedMinutes:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  counts:
                    type: object
                    properties:
                      worked:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      late:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      half:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      leave:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      absent:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      holiday:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      weeklyOff:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                    required:
                      - worked
                      - late
                      - half
                      - leave
                      - absent
                      - holiday
                      - weeklyOff
                  cells:
                    type: array
                    items:
                      type: object
                      properties:
                        day:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        date:
                          type: string
                        kind:
                          type: string
                          enum:
                            - worked
                            - late
                            - half
                            - leave
                            - holiday
                            - weekend
                            - absent
                            - regularize
                            - future
                            - empty
                        status:
                          anyOf:
                            - type: string
                              enum:
                                - Present
                                - Absent
                                - Leave
                                - Half
                                - WeeklyOff
                                - Holiday
                            - type: 'null'
                        workedMinutes:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        otMinutes:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        lateMinutes:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        isToday:
                          type: boolean
                      required:
                        - day
                        - date
                        - kind
                        - status
                        - workedMinutes
                        - otMinutes
                        - lateMinutes
                        - isToday
                  insights:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        icon:
                          type: string
                          enum:
                            - fix
                            - ontime
                            - ot
                            - absent
                            - streak
                        tone:
                          type: string
                          enum:
                            - neutral
                            - accent
                            - ok
                            - warn
                            - bad
                            - info
                        title:
                          type: string
                        meta:
                          type: string
                        cta:
                          anyOf:
                            - type: object
                              properties:
                                label:
                                  type: string
                                date:
                                  type: string
                              required:
                                - label
                                - date
                            - type: 'null'
                      required:
                        - id
                        - icon
                        - tone
                        - title
                        - meta
                        - cta
                required:
                  - month
                  - days
                  - isCurrentMonth
                  - workedDays
                  - expectedDays
                  - workedMinutes
                  - expectedMinutes
                  - counts
                  - cells
                  - insights
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: ont_ API key
      description: >-
        Issue keys in Settings → API. Send them as `Authorization: Bearer ont_…`
        (an `X-Api-Key: ont_…` header is also accepted). Session-cookie routes
        are used by the OnTime web apps and are shown for completeness.

````