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

# Get Activity Summary

> Returns daily aggregated activity metrics.

Each day reports its highest-priority source; metrics it lacks are filled from lower-priority sources.

Aggregates time-series data (steps, energy, heart rate, etc.) by day.



## OpenAPI

````yaml /openapi.json get /api/v1/users/{user_id}/summaries/activity
openapi: 3.1.0
info:
  title: Open Wearables API
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/users/{user_id}/summaries/activity:
    get:
      tags:
        - 'External: Summaries'
      summary: Get Activity Summary
      description: >-
        Returns daily aggregated activity metrics.


        Each day reports its highest-priority source; metrics it lacks are
        filled from lower-priority sources.


        Aggregates time-series data (steps, energy, heart rate, etc.) by day.
      operationId: get_activity_summary_api_v1_users__user_id__summaries_activity_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            description: >-
              ISO 8601 datetime (e.g. `2023-11-07T05:31:56Z`) or Unix timestamp
              in seconds. Date-only strings (e.g. `2023-11-07`) are also
              accepted and cover the whole day, so a date-only range includes
              both boundary days.
            examples:
              - '2023-11-07T05:31:56Z'
              - '2023-11-07'
            format: date-time
            title: Start Date
          description: >-
            ISO 8601 datetime (e.g. `2023-11-07T05:31:56Z`) or Unix timestamp in
            seconds. Date-only strings (e.g. `2023-11-07`) are also accepted and
            cover the whole day, so a date-only range includes both boundary
            days.
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            description: >-
              ISO 8601 datetime (e.g. `2023-11-07T05:31:56Z`) or Unix timestamp
              in seconds. Date-only strings (e.g. `2023-11-07`) are also
              accepted and cover the whole day, so a date-only range includes
              both boundary days.
            examples:
              - '2023-11-07T05:31:56Z'
              - '2023-11-07'
            format: date-time
            title: End Date
          description: >-
            ISO 8601 datetime (e.g. `2023-11-07T05:31:56Z`) or Unix timestamp in
            seconds. Date-only strings (e.g. `2023-11-07`) are also accepted and
            cover the whole day, so a date-only range includes both boundary
            days.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 50
            title: Limit
        - name: sort_order
          in: query
          required: false
          schema:
            type: string
            pattern: ^(asc|desc)$
            default: asc
            title: Sort Order
        - name: X-Open-Wearables-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Open-Wearables-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ActivitySummary_'
        '422':
          description: Validation Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblem'
        4XX:
          description: Client error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        5XX:
          description: Server error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    PaginatedResponse_ActivitySummary_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ActivitySummary'
          type: array
          title: Data
        pagination:
          $ref: '#/components/schemas/Pagination'
        metadata:
          $ref: '#/components/schemas/TimeseriesMetadata'
      type: object
      required:
        - data
        - pagination
        - metadata
      title: PaginatedResponse[ActivitySummary]
    ValidationProblem:
      description: A 422 for a request that failed validation, listing every failure.
      examples:
        - code: VALIDATION_ERROR
          detail: >-
            body.email: value is not a valid email address: An email address
            must have an @-sign. (and 1 more)
          errors:
            - loc:
                - body
                - email
              msg: >-
                value is not a valid email address: An email address must have
                an @-sign.
              type: value_error
            - loc:
                - body
                - first_name
              msg: String should have at most 100 characters
              type: string_too_long
          status: 422
          title: Unprocessable Content
      properties:
        title:
          description: HTTP status phrase
          title: Title
          type: string
        status:
          description: HTTP status code, the same as the response's
          title: Status
          type: integer
        detail:
          description: Human-readable explanation of this occurrence
          title: Detail
          type: string
        code:
          description: Machine-readable error code, stable across releases
          title: Code
          type: string
        errors:
          description: Every validation failure in the request
          items:
            $ref: '#/components/schemas/ValidationErrorItem'
          title: Errors
          type: array
      required:
        - title
        - status
        - detail
        - code
        - errors
      title: ValidationProblem
      type: object
    Problem:
      description: >-
        An error response: RFC 9457 Problem Details, served as
        ``application/problem+json``.


        ``type`` is omitted, which per the RFC means ``about:blank``: ``title``
        is the status

        phrase, and ``code`` tells errors with the same status apart.
      examples:
        - code: NOT_FOUND
          detail: 'User with ID: 123e4567-e89b-12d3-a456-426614174000 not found.'
          status: 404
          title: Not Found
      properties:
        title:
          description: HTTP status phrase
          title: Title
          type: string
        status:
          description: HTTP status code, the same as the response's
          title: Status
          type: integer
        detail:
          description: Human-readable explanation of this occurrence
          title: Detail
          type: string
        code:
          description: Machine-readable error code, stable across releases
          title: Code
          type: string
      required:
        - title
        - status
        - detail
        - code
      title: Problem
      type: object
    ActivitySummary:
      properties:
        date:
          type: string
          format: date
          title: Date
        source:
          $ref: '#/components/schemas/SourceMetadata'
        steps:
          anyOf:
            - type: integer
            - type: 'null'
          title: Steps
          description: Total step count
          example: 8432
        distance_meters:
          anyOf:
            - type: number
            - type: 'null'
          title: Distance Meters
          example: 6240.5
        floors_climbed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Floors Climbed
          description: Calculated from elevation (1 floor ≈ 3m)
          example: 12
        elevation_meters:
          anyOf:
            - type: number
            - type: 'null'
          title: Elevation Meters
          description: Raw total elevation gain
          example: 36
        active_calories_kcal:
          anyOf:
            - type: number
            - type: 'null'
          title: Active Calories Kcal
          description: Active energy burned
          example: 342.5
        total_calories_kcal:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Calories Kcal
          description: >-
            Total energy burned: the provider's reported total when available,
            otherwise active + basal energy when both are reported; null
            otherwise
          example: 2150
        active_minutes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Active Minutes
          description: Minutes with activity above threshold
          example: 60
        sedentary_minutes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sedentary Minutes
          description: Minutes with minimal activity
          example: 480
        intensity_minutes:
          anyOf:
            - $ref: '#/components/schemas/IntensityMinutes'
            - type: 'null'
        heart_rate:
          anyOf:
            - $ref: '#/components/schemas/HeartRateStats'
            - type: 'null'
      type: object
      required:
        - date
        - source
      title: ActivitySummary
    Pagination:
      properties:
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Cursor to fetch next page, null if no more data
          example: eyJpZCI6IjEyMzQ1Njc4OTAiLCJ0cyI6MTcwNDA2NzIwMH0
        previous_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Cursor
          description: Cursor to fetch previous page
        has_more:
          type: boolean
          title: Has More
          description: Whether more data is available
        total_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Count
          description: Total number of records matching the query
          example: 150
      type: object
      required:
        - has_more
      title: Pagination
    TimeseriesMetadata:
      properties:
        resolution:
          anyOf:
            - $ref: '#/components/schemas/Resolution'
            - type: 'null'
        sample_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sample Count
        start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Time
        end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Time
      type: object
      title: TimeseriesMetadata
    ValidationErrorItem:
      properties:
        loc:
          description: Where the invalid value is, e.g. ['body', 'email']
          items:
            anyOf:
              - type: string
              - type: integer
          title: Loc
          type: array
        msg:
          description: What is wrong with it
          title: Msg
          type: string
        type:
          description: Pydantic error type, e.g. 'missing'
          title: Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationErrorItem
      type: object
    SourceMetadata:
      properties:
        provider:
          type: string
          title: Provider
          example: apple
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          example: Connect
        device:
          anyOf:
            - type: string
            - type: 'null'
          title: Device
          example: iPhone15,2
        device_type:
          anyOf:
            - $ref: '#/components/schemas/DeviceType'
            - type: 'null'
          example: phone
        device_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Device Id
          example: R9ZW30ABC12
        device_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Device Name
          description: >-
            Marketing name for ``device``, derived so it cannot drift from the
            raw model.
          readOnly: true
      type: object
      required:
        - provider
        - device_name
      title: SourceMetadata
    IntensityMinutes:
      properties:
        light:
          anyOf:
            - type: integer
            - type: 'null'
          title: Light
        moderate:
          anyOf:
            - type: integer
            - type: 'null'
          title: Moderate
        vigorous:
          anyOf:
            - type: integer
            - type: 'null'
          title: Vigorous
      type: object
      title: IntensityMinutes
    HeartRateStats:
      properties:
        avg_bpm:
          anyOf:
            - type: integer
            - type: 'null'
          title: Avg Bpm
        max_bpm:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Bpm
        min_bpm:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Bpm
      type: object
      title: HeartRateStats
      description: Heart rate statistics for a period.
    Resolution:
      type: string
      enum:
        - raw
        - 1min
        - 5min
        - 15min
        - 1hour
        - 1day
        - 1week
        - 1month
      title: Resolution
      description: >-
        Bucket width requested when reading time series. RAW returns stored
        samples untouched; day, week

        and month read the day aggregates instead of the samples.
    DeviceType:
      type: string
      enum:
        - watch
        - band
        - phone
        - scale
        - ring
        - tablet
        - chest_strap
        - hr_sensor
        - headphones
        - head_mounted
        - glasses
        - smart_display
        - bp_monitor
        - glucose_meter
        - thermometer
        - sleep_monitor
        - bike_computer
        - fitness_machine
        - other
        - unknown
      title: DeviceType
      description: Type of device that collected health data.
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /api/v1/auth/login

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.