> ## 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 button press events for sensor

> Get list of button press events for button sensor



## OpenAPI

````yaml https://api2.rhombussystems.com/api/openapi/public.json post /api/button/getButtonPressEventsForSensor
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/button/getButtonPressEventsForSensor:
    post:
      tags:
        - Button Webservice
      summary: Get button press events for sensor
      description: Get list of button press events for button sensor
      operationId: getButtonPressEventsForSensor
      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/Button_GetButtonPressEventsForSensorWSRequest
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Button_GetButtonPressEventsForSensorWSResponse
          description: OK
components:
  schemas:
    Button_GetButtonPressEventsForSensorWSRequest:
      type: object
      description: Request to get button press events for a specific 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
    Button_GetButtonPressEventsForSensorWSResponse:
      type: object
      description: Response containing button press events for a sensor.
      properties:
        error:
          type: boolean
          nullable: true
        errorMsg:
          type: string
          nullable: true
        events:
          type: array
          description: List of button press events for the sensor
          items:
            $ref: '#/components/schemas/ButtonEventType'
          nullable: true
        warningMsg:
          type: string
          nullable: true
    ButtonEventType:
      type: object
      allOf:
        - type: object
          properties:
            buttonPress:
              $ref: '#/components/schemas/ButtonPressEnum'
            componentCompositeUuid:
              type: string
              format: RUUID
              description: base 64 (url-safe) uuid string
              example: AAAAAAAAAAAAAAAAAAAAAA
              nullable: true
            newSupervisionState:
              $ref: '#/components/schemas/SupervisionStateEnumType'
            pressDurationMillis:
              type: integer
              format: int64
              nullable: true
      nullable: true
      properties:
        componentUuid:
          type: string
          format: RUUID
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          nullable: true
        correlationId:
          type: string
          nullable: true
        createdAtMs:
          type: integer
          format: int64
          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
        ownerDeviceUuid:
          type: string
          format: RUUID
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          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
        type:
          $ref: '#/components/schemas/ComponentEventEnumType'
        uuid:
          type: string
          format: RUUID
          description: base 64 (url-safe) uuid string
          example: AAAAAAAAAAAAAAAAAAAAAA
          nullable: true
    ButtonPressEnum:
      type: string
      enum:
        - NONE
        - SINGLE
        - DOUBLE
        - LONG
        - INITIAL_PRESS
        - LONG_RELEASE
    SupervisionStateEnumType:
      type: string
      enum:
        - CUT_DETECTED
        - SHORT_DETECTED
        - NORMAL
        - INVALID
        - UNKNOWN
    ComponentEventEnumType:
      type: string
      description: >-
        Limits results to only contain the specified type of events, if
        applicable
      enum:
        - DoorbellEvent
        - DoorReaderStateChangeEvent
        - DoorRelayStateChangeEvent
        - DoorPositionIndicatorStateChangeEvent
        - RequestToExitStateChangeEvent
        - CredentialReceivedEvent
        - ButtonEvent
        - GenericInputStateChangeEvent
        - GenericRelayStateChangeEvent
        - AccessControlUnitTamperEvent
        - AccessControlUnitLocationLockdownStateEvent
        - DoorLocationLockdownStateEvent
        - PanicButtonEvent
        - AccessControlUnitBatteryStateChangeEvent
        - WaveToUnlockIntentExpiredEvent
        - DoorStateChangeEvent
        - DoorAuthFirstInStateEvent
        - DoorScheduleFirstInStateEvent
        - AccessControlUnitDoorFirstInStateEvent
        - AperioDoorExtensionStateEvent
        - AperioActivatorStateEvent
        - AperioKeyCylinderStateEvent
        - AperioDoorModeEvent
        - AperioDoorHandleStateEvent
        - AperioGatewayStateEvent
        - AperioGatewayConnectionStateChangeEvent
        - AperioDtcEvent
        - AperioTamperStateEvent
  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

````