Get recent activity for a user​
GET
/users/{id}/getRecentActivity
Gets recent activity for a user, which focuses around notifications that have been triggered.
Authorizations​
ApiKeyAuth
API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See Authentication for more details.
Type
API Key (header: Authorization)
Example
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."Parameters​
Path Parameters
id*
user id
Type
Requiredstring
Example
"5678"Format
"JSON"Query Parameters
dateRange*
Type
Requiredstring
Example
[1756249200000,1756388711959]Format
"JSON"GET
/users/{id}/getRecentActivity
Request example
Responses​
Request was successful
application/json
JSON{"created": "string","params": {"type": "string","subtype": "string","name": "string","zones": ["string"],"message": "string"},"deviceId": 0,"pointId": 0,"triggerId": 0}
[
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
 Â
]
Try this endpoint
Playground​
Authorization
Variables
Key
Value
OpenAPI definition ​
References are expanded below, except recursive definitions and references with sibling fields. Documentation overrides are included. Full original OpenAPI spec (JSON).
View endpoint OpenAPI definition
yaml
openapi: 3.1.0
info:
version: 1.1.0
title: TrackingAPI
description: V1 API for retrieving tracking data and changing settings on Lightbug devices
servers:
- url: https://api.lightbug.cloud/api
externalDocs: {}
security:
- ApiKeyAuth: []
tags: []
paths:
/users/{id}/getRecentActivity:
get:
tags:
- notifications
parameters:
- name: id
in: path
description: user id
required: true
schema:
type: string
format: JSON
example: '5678'
- name: dateRange
in: query
required: true
schema:
type: string
format: JSON
example: '[1756249200000,1756388711959]'
responses:'200':
yaml
description: Request was successful
content:
application/json:
schema:
type: array
items:
type: object
properties:
created:
type: string
format: date-time
params:
type: object
properties:
type:
type: string
enum:
- lowBat
- button
- expiresDaily
- expiresWeekly
- geofence
- newLoc
- newWakeLoc
- acc
- newReading
- speed
- distance
- alertMode
- temp
- temp_bme
- humidity
- pressure
- extAccel
- geoEntry
- proximity
subtype:
type: string
name:
type: string
zones:
type: array
items:
type: string
message:
type: string
deviceId:
type: number
description: The ID of the device that generated this activity.
pointId:
type: number
description: Either a datapoint ID or a reading ID, depending on the type of activity.
triggerId:
type: number
description: The ID of the notification trigger that caused this activity, if applicable.yaml
deprecated: false
security:
- ApiKeyAuth: []
operationId: get-users-id-getRecentActivity
summary: Get recent activity for a user
description: Gets recent activity for a user, which focuses around notifications that have been triggered.
components:
securitySchemes:
ApiKeyAuth:
in: header
name: Authorization
type: apiKey
description: API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See <a href='/apis/authentication'>Authentication</a> for more details.
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...