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

# Paginated login history (success + failure)



## OpenAPI

````yaml /api-reference/openapi.json get /v1/profile/security/login-history
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/profile/security/login-history:
    get:
      tags:
        - Security
      summary: Paginated login history (success + failure)
      operationId: get_login_history_v1_profile_security_login_history_get
      parameters:
        - name: after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: After
        - name: before
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Before
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
        - name: order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_LoginHistoryItem_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    PaginatedResponse_LoginHistoryItem_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/LoginHistoryItem'
          type: array
          title: Data
        first_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: First Id
        last_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Last Id
        has_more:
          type: boolean
          title: Has More
        current_page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Current Page
        total_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Pages
      type: object
      required:
        - data
        - has_more
      title: PaginatedResponse[LoginHistoryItem]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LoginHistoryItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        event_type:
          type: string
          title: Event Type
        result:
          type: string
          title: Result
          description: '''success'' or ''failure'''
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Reason
        ip:
          anyOf:
            - type: string
            - type: 'null'
          title: Ip
        browser:
          anyOf:
            - type: string
            - type: 'null'
          title: Browser
        os:
          anyOf:
            - type: string
            - type: 'null'
          title: Os
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
          description: City, Country (best-effort)
      type: object
      required:
        - id
        - created_at
        - event_type
        - result
      title: LoginHistoryItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````