Logs-4

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

Endpoints

GET
POST
POST
POST
GET

Retrieve logs has logs

Required API key scopes

logs:read

Path parameters

  • project_id
    string

Example request

GET /api/projects/:project_id/logs/has_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/logs/has_logs/

Example response

Status 200 No response body

Create logs query

Required API key scopes

logs:read

Path parameters

  • project_id
    string

Request parameters

  • query

Example request

POST /api/projects/:project_id/logs/query
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/logs/query/\
-d query=undefined

Example response

Status 200 No response body

Create logs query

Required API key scopes

logs:read

Path parameters

  • project_id
    string

Request parameters

  • query

Example request

POST /api/projects/:project_id/logs/query
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/logs/query/\
-d query=undefined

Example response

Status 200 No response body

Create logs services

Required API key scopes

logs:read

Path parameters

  • project_id
    string

Example request

POST /api/projects/:project_id/logs/services
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/logs/services/

Example response

Status 200 No response body

Create logs services

Required API key scopes

logs:read

Path parameters

  • project_id
    string

Example request

POST /api/projects/:project_id/logs/services
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/logs/services/

Example response

Status 200 No response body

Create logs sparkline

Required API key scopes

logs:read

Path parameters

  • project_id
    string

Example request

POST /api/projects/:project_id/logs/sparkline
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/logs/sparkline/

Example response

Status 200 No response body

Create logs sparkline

Required API key scopes

logs:read

Path parameters

  • project_id
    string

Example request

POST /api/projects/:project_id/logs/sparkline
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/logs/sparkline/

Example response

Status 200 No response body

Retrieve logs values

Required API key scopes

logs:read

Path parameters

  • project_id
    string

Query parameters

  • attribute_type
    string
    One of: "log""resource"
  • key
    string
  • value
    string

Example request

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

Example response

Status 200 No response body

Retrieve logs values

Required API key scopes

logs:read

Path parameters

  • project_id
    string

Query parameters

  • attribute_type
    string
    One of: "log""resource"
  • key
    string
  • value
    string

Example request

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

Example response

Status 200 No response body

Community questions

Questions about this page? or post a community question.