Logs
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
Retrieve logs attributes
Required API key scopes
error_tracking:read
Path parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request
GET
/api /projects /:project_id /logs /attributes
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/attributes/
Response
Status 200 No response body
Create logs query
Required API key scopes
error_tracking:read
Path parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
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/
Response
Status 200 No response body
Create logs sparkline
Required API key scopes
error_tracking:read
Path parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
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/
Response
Status 200 No response body
Retrieve logs values
Required API key scopes
error_tracking:read
Path parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
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/