This is the main endpoint for querying data from PostHog. You can find all the details on what it does and how you can use it in our API queries doc.
If you don't want to read that, here's an example of how to use it to get events where the $current_url
contains blog using the HogQLQuery
query type and SQL:
curl \-H 'Content-Type: application/json' \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/query/ \-d '{"query": {"kind": "HogQLQuery","query": "select properties.$current_url from events where properties.$current_url like '\''%/blog%'\'' limit 100"}}'
Again, more details about this endpoint are available in our API queries doc.