> ## 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 occupancy counts

> Returns the estimated occupancy count for a specified room or area within a given time range. This endpoint allows you to monitor occupancy trends over time or retrieve a single count for a defined interval.
Important: An occupancy region must be defined in the Rhombus Console before using this endpoint.
You can optionally specify an interval (e.g., MINUTELY, QUARTERHOURLY, HOURLY ...) to retrieve occupancy counts broken down by sub-intervals between startTime and endTime.
If no interval is provided, a single occupancy count is returned for the entire duration between startTime and endTime.



## OpenAPI

````yaml https://api2.rhombussystems.com/api/openapi/public.json post /api/report/getOccupancyCounts
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/report/getOccupancyCounts:
    post:
      tags:
        - Report Webservice
      summary: Get occupancy counts
      description: >-
        Returns the estimated occupancy count for a specified room or area
        within a given time range. This endpoint allows you to monitor occupancy
        trends over time or retrieve a single count for a defined interval.

        Important: An occupancy region must be defined in the Rhombus Console
        before using this endpoint.

        You can optionally specify an interval (e.g., MINUTELY, QUARTERHOURLY,
        HOURLY ...) to retrieve occupancy counts broken down by sub-intervals
        between startTime and endTime.

        If no interval is provided, a single occupancy count is returned for the
        entire duration between startTime and endTime.
      operationId: getOccupancyCounts
      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/Report_GetOccupancyCountsWSRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Report_GetOccupancyCountsWSResponse'
          description: OK
components:
  schemas:
    Report_GetOccupancyCountsWSRequest:
      type: object
      description: Request object for getting occupancy counts from a device.
      properties:
        deviceUuid:
          type: string
          format: DeviceFacetUuid
          description: RUUID with optional appended facet information
          example: AAAAAAAAAAAAAAAAAAAAAA.v0
          nullable: true
        endTimeMs:
          type: integer
          format: int64
          description: >-
            The end timestamp (in Unix epoch milliseconds) of the selected
            interval
          example: 1640998800000
          nullable: true
        interval:
          $ref: '#/components/schemas/ReportIntervalEnum'
        startTimeMs:
          type: integer
          format: int64
          description: >-
            The start timestamp (in Unix epoch milliseconds) of the selected
            interval
          example: 1640995200000
          nullable: true
    Report_GetOccupancyCountsWSResponse:
      type: object
      description: Response object for getting occupancy counts from a device.
      properties:
        error:
          type: boolean
          nullable: true
        errorMsg:
          type: string
          nullable: true
        timeSeriesDataPoints:
          type: array
          description: List of time series data points with occupancy counts
          items:
            $ref: '#/components/schemas/Report_TimeSeriesDataPointV2ExtendedType'
          nullable: true
        warningMsg:
          type: string
          nullable: true
    ReportIntervalEnum:
      type: string
      description: Report interval for filtering face events
      enum:
        - MINUTELY
        - QUARTERHOURLY
        - HOURLY
        - DAILY
        - WEEKLY
        - MONTHLY
    Report_TimeSeriesDataPointV2ExtendedType:
      type: object
      description: Extended time series data point with additional timestamp information.
      properties:
        approximateTimestampMsMap:
          type: object
          additionalProperties:
            type: integer
            format: int64
            description: >-
              A mapping of timestamps (in Unix epoch milliseconds) that
              indicate, for each type and interval, the point in time where the
              aggregated occupancy count is closest to the occupancy observed in
              the corresponding video segment
            nullable: true
          description: >-
            A mapping of timestamps (in Unix epoch milliseconds) that indicate,
            for each type and interval, the point in time where the aggregated
            occupancy count is closest to the occupancy observed in the
            corresponding video segment
          nullable: true
        dateLocal:
          type: string
          nullable: true
        dateUtc:
          type: string
          nullable: true
        eventCountMap:
          type: object
          additionalProperties:
            type: integer
            format: int64
            nullable: true
          nullable: true
        reportingDevicesMap:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
              format: DeviceFacetUuid
              description: RUUID with optional appended facet information
              example: AAAAAAAAAAAAAAAAAAAAAA.v0
              nullable: true
            nullable: true
          nullable: true
        timestampMs:
          type: integer
          format: int64
          description: >-
            The representative timestamp (in Unix epoch milliseconds) for the
            interval
          example: 1640995200000
          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

````