This document describes the use of HappySignals audit / activity log API which can be used to pull and track actions done within the application to monitoring systems.
API Endpoint
https://<client>.<environment>.happysignals.com/api/v3/auditlog
Access control
Access to the API is controlled by means of a shared secret in the form of a unique API-token per client.
To acquire your API-key, get in touch with HappySignals support.
The token must be passed with each request to the API as a bearer token in an Authorization HTTP header.
The API key must be base64 encoded if used in the Authorization header as per RFC6750.
API Queries
Example query to the API with Authorization done with a Bearer token
GET /api/v3/auditlog HTTP/1.1
Host: <client>.<environment>.happysignals.com
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer YjJlMTFiN1236YSAdslM2ExNDAzYjgx
Accept: JSON
Content-Length: 0
You can limit you query results with additional parameters described below
Parameter | Description | Options / type | Example param values |
---|---|---|---|
start | Date or datetime from which onwards audit logs entries are returned. | Datetime | 2024-08-16 2024-08-16T11:39:18.112742Z |
end | Date or datetime from which before audit logs entries are returned. | Datetime | 2024-08-16 2024-08-16T11:39:18.112742Z |
action | What type of action was recorded to the activity log. |
"" |
security |
ordering | How results are ordered in the response. Ascending or descending. |
created_at -created_at |
created_at -created_at |
Collection envelope
{
"count": <total number of results>,
"next": <query URL for next page of results>,
"previous": <query URL for previous page of results>,
"results": [
<array of result objects>
]
}
Example API Response
{
"count": 1234,
"next": "https://<client>.<environment>.happysignals.com/api/v3/auditlog/?limit=200&offset=400",
"previous": "https://<client>.<environment>.happysignals.com/api/v3/auditlog/?limit=200",
"results": [
{
"created_at": "2024-06-19T07:19:00.453839Z",
"action": "security",
"principal": "user@example.com",
"message": "Signed in"
},
...
]
}