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

# Get list of door open/close events for door sensor

> Get list of door open/close events for door sensor



## OpenAPI

````yaml https://api2.rhombussystems.com/api/openapi/public.json post /api/door/getDoorEventsForSensor
openapi: 3.0.1
info:
  contact:
    email: developer@rhombussystems.com
  description: >-
    This API is for use by Rhombus customers and partners.


    ## Authentication


    All requests require two headers:

    - `x-auth-scheme` — The authentication scheme identifier. Use `api-token`
    for standard API key auth, or `partner-api-token` for partner API auth.

    - `x-auth-apikey` — Your Rhombus API key.


    Example:

    ```

    POST /api/camera/getMinimalCameraStateList

    x-auth-scheme: api-token

    x-auth-apikey: YOUR_API_KEY

    Content-Type: application/json

    ```
  title: Rhombus API
  version: '1.0'
servers:
  - description: Production Server
    url: https://api2.rhombussystems.com
security:
  - ApiKeyAuth: []
paths:
  /api/door/getDoorEventsForSensor:
    post:
      tags:
        - Door Webservice
      summary: Get list of door open/close events for door sensor
      description: Get list of door open/close events for door sensor
      operationId: getDoorEventsForSensor
      parameters:
        - description: >-
            Authentication scheme identifier. Use `api-token` for standard API
            key authentication, `partner-api-token` for partner API key
            authentication. Must be paired with the `x-auth-apikey` header
            containing your API key.
          example: api-token
          in: header
          name: x-auth-scheme
          required: true
          schema:
            type: string
            default: api-token
            enum:
              - api-token
              - api
              - partner-api-token
              - partner-api
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Door_GetDoorEventsForSensorWSRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Door_GetDoorEventsForSensorWSResponse'
          description: OK
components:
  schemas:
    Door_GetDoorEventsForSensorWSRequest:
      type: object
      description: Request object for retrieving door open/close events for a door sensor.
      properties:
        createdAfterMs:
          type: integer
          format: int64
          description: Timestamp in milliseconds to get events created after this time
          example: 1640995200000
          nullable: true
        createdBeforeMs:
          type: integer
          format: int64
          description: Timestamp in milliseconds to get events created before this time
          example: 1640995200000
          nullable: true
        limit:
          type: integer
          format: int32
          description: Maximum number of events to return
          example: 100
          nullable: true
        sensorUuid:
          type: string
          format: RUUID
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          nullable: true
        stateFilter:
          $ref: '#/components/schemas/DoorStateEnum'
    Door_GetDoorEventsForSensorWSResponse:
      type: object
      description: Response object containing door open/close events for a door sensor.
      properties:
        doorEvents:
          type: array
          description: List of door open/close events for the sensor
          items:
            $ref: '#/components/schemas/DoorEventType'
          nullable: true
        error:
          type: boolean
          nullable: true
        errorMsg:
          type: string
          nullable: true
        warningMsg:
          type: string
          nullable: true
    DoorStateEnum:
      type: string
      description: Filter events by door state
      enum:
        - OPEN
        - CLOSED
        - AJAR
    DoorEventType:
      type: object
      description: List of door open/close events for the sensor
      properties:
        baseStationUuid:
          type: string
          format: RUUID
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          nullable: true
        batteryPercentage:
          type: integer
          format: int32
          nullable: true
        bleDeviceUuid:
          type: string
          format: RUUID
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          nullable: true
        bleRssi:
          type: integer
          format: int32
          nullable: true
        closeBaseStations:
          type: array
          items:
            type: string
            format: RUUID
            description: base 64 (url-safe) uuid string
            example: AAAAAAAAAAAAAAAAAAAAAA
            nullable: true
          nullable: true
        locationUuid:
          type: string
          format: RUUID
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          nullable: true
        orgUuid:
          type: string
          format: RUUID
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          nullable: true
        state:
          $ref: '#/components/schemas/DoorStateEnum'
        stateChanged:
          type: boolean
          nullable: true
        subLocationsHierarchyKey:
          type: string
          format: SubLocationsHierarchyKey
          description: |
            A sequence of one or more base 64 (url-safe) uuid substrings.
            These substrings are separated by dots (.).
          example: AAAAAAAAAAAAAAAAAAAAAA.AAAAAAAAAAAAAAAAAAAAAA.AAAAAAAAAAAAAAAAAAAAAA
          nullable: true
          pattern: ^([A-Za-z0-9\-_]{22})([.][A-Za-z0-9\-_]{22})*$
        timestampMs:
          type: integer
          format: int64
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      description: >-
        Your Rhombus API key. Must be accompanied by the `x-auth-scheme` header
        set to `api-token` (or `partner-api-token` for partner endpoints).
      in: header
      name: x-auth-apikey
      type: apiKey

````