Advanced Activity

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
GET
POST

List all advanced activity logs

Required API key scopes

activity_log:read

Path parameters

  • project_id
    string

Query parameters

  • activities
    array
    Default:
  • clients
    array
    Default:
  • detail_filters
    string
  • end_date
    string
  • hogql_filter
    string
  • is_system
    boolean
  • item_ids
    array
    Default:
  • page
    integer
  • page_size
    integer
    Default: 100
  • scopes
    array
    Default:
  • search_text
    string
  • start_date
    string
  • users
    array
    Default:
  • was_impersonated
    boolean

Response


Example request

GET /api/projects/:project_id/advanced_activity_logs
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/advanced_activity_logs/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"unread": true,
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"was_impersonated": true,
"is_system": true,
"client": "string",
"activity": "string",
"item_id": "string",
"scope": "string",
"detail": null,
"created_at": "2019-08-24T14:15:22Z"
}
]
}

Retrieve advanced activity logs available filters

Required API key scopes

activity_log:read

Path parameters

  • project_id
    string

Response


Example request

GET /api/projects/:project_id/advanced_activity_logs/available_filters
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/advanced_activity_logs/available_filters/

Example response

Status 200
RESPONSE
{
"static_filters": {
"users": [
{
"property1": null,
"property2": null
}
],
"scopes": [
{
"property1": null,
"property2": null
}
],
"activities": [
{
"property1": null,
"property2": null
}
],
"clients": [
{
"property1": null,
"property2": null
}
]
},
"detail_fields": {
"property1": null,
"property2": null
}
}

Create advanced activity logs export

Path parameters

  • project_id
    string

Request parameters

  • user
  • organization_id
    string
  • was_impersonated
    boolean
  • is_system
    boolean
  • client
    string
  • activity
    string
  • item_id
    string
  • scope
    string
  • detail
  • created_at
    string

Response


Example request

POST /api/projects/:project_id/advanced_activity_logs/export
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/advanced_activity_logs/export/\
-d user=undefined,\
-d activity="string",\
-d scope="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"unread": true,
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"was_impersonated": true,
"is_system": true,
"client": "string",
"activity": "string",
"item_id": "string",
"scope": "string",
"detail": null,
"created_at": "2019-08-24T14:15:22Z"
}

Community questions

Questions about this page? or post a community question.