Core-3

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

Endpoints

GET
POST
GET
GET
GET
GET
POST
GET
POST
DELETE
POST
GET
POST
GET
PATCH
DELETE
POST
GET
POST

Retrieve environments groups activity

Required API key scopes

activity_log:read

Path parameters

  • environment_id
    string

Query parameters

  • group_type_index
    integer
  • id
    string

Example request

GET /api/environments/:environment_id/groups/activity
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/groups/activity/

Example response

Status 200 No response body

Create environments groups delete property

Required API key scopes

group:write

Path parameters

  • environment_id
    string

Query parameters

  • group_key
    string
  • group_type_index
    integer

Request parameters

  • group_type_index
    integer
  • group_key
    string
  • group_properties

Example request

POST /api/environments/:environment_id/groups/delete_property
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/environments/:environment_id/groups/delete_property/\
-d group_type_index="integer",\
-d group_key="string"

Example response

Status 200 No response body

Retrieve environments groups find

Required API key scopes

group:read

Path parameters

  • environment_id
    string

Query parameters

  • group_key
    string
  • group_type_index
    integer

Example request

GET /api/environments/:environment_id/groups/find
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/groups/find/

Example response

Status 200 No response body

Retrieve environments groups property definitions

Required API key scopes

group:read

Path parameters

  • environment_id
    string

Example request

GET /api/environments/:environment_id/groups/property_definitions
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/groups/property_definitions/

Example response

Status 200 No response body

Retrieve environments groups property values

Required API key scopes

group:read

Path parameters

  • environment_id
    string

Example request

GET /api/environments/:environment_id/groups/property_values
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/groups/property_values/

Example response

Status 200 No response body


Create environments groups update property

Required API key scopes

group:write

Path parameters

  • environment_id
    string

Query parameters

  • group_key
    string
  • group_type_index
    integer

Request parameters

  • group_type_index
    integer
  • group_key
    string
  • group_properties

Example request

POST /api/environments/:environment_id/groups/update_property
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/environments/:environment_id/groups/update_property/\
-d group_type_index="integer",\
-d group_key="string"

Example response

Status 200 No response body

List all environments insights sharing

Required API key scopes

sharing_configuration:read

Path parameters

  • environment_id
    string
  • insight_id
    integer

Example request

GET /api/environments/:environment_id/insights/:insight_id/sharing
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/insights/:insight_id/sharing/

Example response

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": [
{
"id": 0,
"created_at": "2019-08-24T14:15:22Z",
"note": "string",
"created_by_email": "string",
"is_active": true
}
]
}

Create environments insights sharing passwords

Create a new password for the sharing configuration.

Required API key scopes

sharing_configuration:write

Path parameters

  • environment_id
    string
  • insight_id
    integer

Request parameters

  • enabled
    boolean
  • settings
  • password_required
    boolean

Response


Example request

POST /api/environments/:environment_id/insights/:insight_id/sharing/passwords
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/environments/:environment_id/insights/:insight_id/sharing/passwords/\
-d created_at="string"

Example response

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": [
{
"id": 0,
"created_at": "2019-08-24T14:15:22Z",
"note": "string",
"created_by_email": "string",
"is_active": true
}
]
}

Delete environments insights sharing passwords

Delete a password from the sharing configuration.

Required API key scopes

sharing_configuration:write

Path parameters

  • environment_id
    string
  • insight_id
    integer
  • password_id
    string

Example request

DELETE /api/environments/:environment_id/insights/:insight_id/sharing/passwords/:password_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/insights/:insight_id/sharing/passwords/:password_id/

Example response

Status 204 No response body

Create environments insights sharing refresh

Required API key scopes

sharing_configuration:write

Path parameters

  • environment_id
    string
  • insight_id
    integer

Request parameters

  • enabled
    boolean
  • settings
  • password_required
    boolean

Response


Example request

POST /api/environments/:environment_id/insights/:insight_id/sharing/refresh
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/environments/:environment_id/insights/:insight_id/sharing/refresh/\
-d created_at="string"

Example response

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": [
{
"id": 0,
"created_at": "2019-08-24T14:15:22Z",
"note": "string",
"created_by_email": "string",
"is_active": true
}
]
}

List all environments project secret api keys

Required API key scopes

project:read

Path parameters

  • environment_id
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

GET /api/environments/:environment_id/project_secret_api_keys
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/project_secret_api_keys/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "string",
"label": "string",
"value": "string",
"mask_value": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"last_used_at": "2019-08-24T14:15:22Z",
"last_rolled_at": "2019-08-24T14:15:22Z",
"scopes": [
"string"
]
}
]
}

Create environments project secret api keys

Required API key scopes

project:write

Path parameters

  • environment_id
    string

Request parameters

  • label
    string
  • scopes
    array

Response


Example request

POST /api/environments/:environment_id/project_secret_api_keys
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/environments/:environment_id/project_secret_api_keys/\
-d label="string",\
-d scopes="array"

Example response

Status 201
RESPONSE
{
"id": "string",
"label": "string",
"value": "string",
"mask_value": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"last_used_at": "2019-08-24T14:15:22Z",
"last_rolled_at": "2019-08-24T14:15:22Z",
"scopes": [
"string"
]
}

Retrieve environments project secret api keys

Required API key scopes

project:read

Path parameters

  • environment_id
    string
  • id
    string

Response


Example request

GET /api/environments/:environment_id/project_secret_api_keys/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/project_secret_api_keys/:id/

Example response

Status 200
RESPONSE
{
"id": "string",
"label": "string",
"value": "string",
"mask_value": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"last_used_at": "2019-08-24T14:15:22Z",
"last_rolled_at": "2019-08-24T14:15:22Z",
"scopes": [
"string"
]
}

Update environments project secret api keys

Required API key scopes

project:write

Path parameters

  • environment_id
    string
  • id
    string

Request parameters

  • label
    string
  • scopes
    array

Response


Example request

PATCH /api/environments/:environment_id/project_secret_api_keys/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/project_secret_api_keys/:id/\
-d label="string"

Example response

Status 200
RESPONSE
{
"id": "string",
"label": "string",
"value": "string",
"mask_value": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"last_used_at": "2019-08-24T14:15:22Z",
"last_rolled_at": "2019-08-24T14:15:22Z",
"scopes": [
"string"
]
}

Delete environments project secret api keys

Required API key scopes

project:write

Path parameters

  • environment_id
    string
  • id
    string

Example request

DELETE /api/environments/:environment_id/project_secret_api_keys/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/project_secret_api_keys/:id/

Example response

Status 204 No response body

Create environments project secret api keys roll

Roll a project secret API key

Path parameters

  • environment_id
    string
  • id
    string

Response


Example request

POST /api/environments/:environment_id/project_secret_api_keys/:id/roll
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/environments/:environment_id/project_secret_api_keys/:id/roll/

Example response

Status 200
RESPONSE
{
"id": "string",
"label": "string",
"value": "string",
"mask_value": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"last_used_at": "2019-08-24T14:15:22Z",
"last_rolled_at": "2019-08-24T14:15:22Z",
"scopes": [
"string"
]
}

List all environments session recordings sharing

Required API key scopes

sharing_configuration:read

Path parameters

  • environment_id
    string
  • recording_id
    string

Example request

GET /api/environments/:environment_id/session_recordings/:recording_id/sharing
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:environment_id/session_recordings/:recording_id/sharing/

Example response

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": [
{
"id": 0,
"created_at": "2019-08-24T14:15:22Z",
"note": "string",
"created_by_email": "string",
"is_active": true
}
]
}

Create environments session recordings sharing passwords

Create a new password for the sharing configuration.

Required API key scopes

sharing_configuration:write

Path parameters

  • environment_id
    string
  • recording_id
    string

Request parameters

  • enabled
    boolean
  • settings
  • password_required
    boolean

Response


Example request

POST /api/environments/:environment_id/session_recordings/:recording_id/sharing/passwords
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/environments/:environment_id/session_recordings/:recording_id/sharing/passwords/\
-d created_at="string"

Example response

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": [
{
"id": 0,
"created_at": "2019-08-24T14:15:22Z",
"note": "string",
"created_by_email": "string",
"is_active": true
}
]
}
Next page →

Community questions

Questions about this page? or post a community question.