Environments-11
For instructions on how to authenticate to use this endpoint, see API overview.
This endpoint is meant for reading and deleting persons. To create or update persons, we recommend using the capture API, the $set and $unset properties, or one of our SDKs.
Endpoints
Retrieve environments persons stickiness
Path parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- formatstringOne of:"csv""json"
Request
GET 
Response
Status 200 No response body
Retrieve environments persons stickiness
Path parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- formatstringOne of:"csv""json"
Request
GET 
Response
Status 200 No response body
Retrieve environments persons trends
Path parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- formatstringOne of:"csv""json"
Request
GET 
Response
Status 200 No response body
Retrieve environments persons trends
Path parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- formatstringOne of:"csv""json"
Request
GET 
Response
Status 200 No response body
Retrieve environments persons values
Required API key scopes
person:readPath parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- formatstringOne of:"csv""json"
Request
GET 
Response
Status 200 No response body
Retrieve environments persons values
Required API key scopes
person:readPath parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- formatstringOne of:"csv""json"
Request
GET 
Response
Status 200 No response body
List all environments plugin configs logs
Required API key scopes
plugin:readPath parameters
- plugin_config_idstring
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- limitintegerNumber of results to return per page. 
- offsetintegerThe initial index from which to return the results. 
Response
Request
GET 
Response
Status 200
List all environments plugin configs logs
Required API key scopes
plugin:readPath parameters
- plugin_config_idstring
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- limitintegerNumber of results to return per page. 
- offsetintegerThe initial index from which to return the results. 
Response
Request
GET 
Response
Status 200
Create environments query
Required API key scopes
query:readPath parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request parameters
- async
- client_query_idClient provided query ID. Can be used to retrieve the status or cancel the query. 
- filters_override
- querySubmit a JSON string representing a query for PostHog data analysis, for example a HogQL query. Example payload: {"query": {"kind": "HogQLQuery", "query": "select * from events limit 100"}}For more details on HogQL queries, see the PostHog HogQL documentation. 
- refreshDefault:blockingWhether results should be calculated sync or async, and how much to rely on the cache: - 'blocking'- calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache
- 'async'- kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache
- 'lazy_async'- kick off background calculation, UNLESS there are somewhat fresh results in the cache
- 'force_blocking'- calculate synchronously, even if fresh results are already cached
- 'force_async'- kick off background calculation, even if fresh results are already cached
- 'force_cache'- return cached data or a cache miss; always completes immediately as it never calculates Background calculation can be tracked using the- query_statusresponse field.
 
- variables_override
Response
Request
POST 
Response
Status 200
Create environments query
Required API key scopes
query:readPath parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request parameters
- async
- client_query_idClient provided query ID. Can be used to retrieve the status or cancel the query. 
- filters_override
- querySubmit a JSON string representing a query for PostHog data analysis, for example a HogQL query. Example payload: {"query": {"kind": "HogQLQuery", "query": "select * from events limit 100"}}For more details on HogQL queries, see the PostHog HogQL documentation. 
- refreshDefault:blockingWhether results should be calculated sync or async, and how much to rely on the cache: - 'blocking'- calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache
- 'async'- kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache
- 'lazy_async'- kick off background calculation, UNLESS there are somewhat fresh results in the cache
- 'force_blocking'- calculate synchronously, even if fresh results are already cached
- 'force_async'- kick off background calculation, even if fresh results are already cached
- 'force_cache'- return cached data or a cache miss; always completes immediately as it never calculates Background calculation can be tracked using the- query_statusresponse field.
 
- variables_override
Response
Request
POST 
Response
Status 200
Retrieve environments query
(Experimental)
Required API key scopes
query:readPath parameters
- idstring
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Response
Request
GET 
Response
Status 200
Retrieve environments query
(Experimental)
Required API key scopes
query:readPath parameters
- idstring
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Response
Request
GET 
Response
Status 200
Delete environments query
(Experimental)
Required API key scopes
query:readPath parameters
- idstring
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request
DELETE 
Response
Status 204 Query cancelled
Delete environments query
(Experimental)
Required API key scopes
query:readPath parameters
- idstring
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request
DELETE 
Response
Status 204 Query cancelled
Retrieve environments query draft sql
Path parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request
GET 
Response
Status 200 No response body
Retrieve environments query draft sql
Path parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Request
GET 
Response
Status 200 No response body
List all environments session recordings
Required API key scopes
session_recording:readPath parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- limitintegerNumber of results to return per page. 
- offsetintegerThe initial index from which to return the results. 
Response
Request
GET 
Response
Status 200
List all environments session recordings
Required API key scopes
session_recording:readPath parameters
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Query parameters
- limitintegerNumber of results to return per page. 
- offsetintegerThe initial index from which to return the results. 
Response
Request
GET 
Response
Status 200
Retrieve environments session recordings
Required API key scopes
session_recording:readPath parameters
- idstringA UUID string identifying this session recording. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Response
Request
GET 
Response
Status 200
Retrieve environments session recordings
Required API key scopes
session_recording:readPath parameters
- idstringA UUID string identifying this session recording. 
- project_idstringProject ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/. 
Response
Request
GET 
Response
Status 200