Environments-8

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

Endpoints

POST
GET
PATCH
DELETE
GET
GET
DELETE
GET
GET
GET
POST

Create error tracking autocapture controls

Required API key scopes

error_tracking:write

Path parameters

  • project_id
    string

Request parameters

  • match_type
  • sample_rate
    string
  • linked_feature_flag
  • event_triggers
    array
  • url_triggers
    array
  • url_blocklist
    array

Response


Example request

POST /api/environments/:project_id/error_tracking/autocapture_controls
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/:project_id/error_tracking/autocapture_controls/\
-d library=undefined

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"library": "web",
"match_type": "all",
"sample_rate": "string",
"linked_feature_flag": null,
"event_triggers": [
"string"
],
"url_triggers": [
null
],
"url_blocklist": [
null
]
}

Create error tracking autocapture controls

Required API key scopes

error_tracking:write

Path parameters

  • project_id
    string

Request parameters

  • match_type
  • sample_rate
    string
  • linked_feature_flag
  • event_triggers
    array
  • url_triggers
    array
  • url_blocklist
    array

Response


Example request

POST /api/environments/:project_id/error_tracking/autocapture_controls
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/:project_id/error_tracking/autocapture_controls/\
-d library=undefined

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"library": "web",
"match_type": "all",
"sample_rate": "string",
"linked_feature_flag": null,
"event_triggers": [
"string"
],
"url_triggers": [
null
],
"url_blocklist": [
null
]
}

Retrieve error tracking autocapture controls

Required API key scopes

error_tracking:read

Path parameters

  • id
    string
  • project_id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"library": "web",
"match_type": "all",
"sample_rate": "string",
"linked_feature_flag": null,
"event_triggers": [
"string"
],
"url_triggers": [
null
],
"url_blocklist": [
null
]
}

Retrieve error tracking autocapture controls

Required API key scopes

error_tracking:read

Path parameters

  • id
    string
  • project_id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"library": "web",
"match_type": "all",
"sample_rate": "string",
"linked_feature_flag": null,
"event_triggers": [
"string"
],
"url_triggers": [
null
],
"url_blocklist": [
null
]
}

Update error tracking autocapture controls

Required API key scopes

error_tracking:write

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • match_type
  • sample_rate
    string
  • linked_feature_flag
  • event_triggers
    array
  • url_triggers
    array
  • url_blocklist
    array

Response


Example request

PATCH /api/environments/:project_id/error_tracking/autocapture_controls/: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/:project_id/error_tracking/autocapture_controls/:id/\
-d library=undefined

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"library": "web",
"match_type": "all",
"sample_rate": "string",
"linked_feature_flag": null,
"event_triggers": [
"string"
],
"url_triggers": [
null
],
"url_blocklist": [
null
]
}

Update error tracking autocapture controls

Required API key scopes

error_tracking:write

Path parameters

  • id
    string
  • project_id
    string

Request parameters

  • match_type
  • sample_rate
    string
  • linked_feature_flag
  • event_triggers
    array
  • url_triggers
    array
  • url_blocklist
    array

Response


Example request

PATCH /api/environments/:project_id/error_tracking/autocapture_controls/: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/:project_id/error_tracking/autocapture_controls/:id/\
-d library=undefined

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"library": "web",
"match_type": "all",
"sample_rate": "string",
"linked_feature_flag": null,
"event_triggers": [
"string"
],
"url_triggers": [
null
],
"url_blocklist": [
null
]
}

Delete error tracking autocapture controls

Required API key scopes

error_tracking:write

Path parameters

  • id
    string
  • project_id
    string

Example request

DELETE /api/environments/:project_id/error_tracking/autocapture_controls/: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/:project_id/error_tracking/autocapture_controls/:id/

Example response

Status 204 No response body

Delete error tracking autocapture controls

Required API key scopes

error_tracking:write

Path parameters

  • id
    string
  • project_id
    string

Example request

DELETE /api/environments/:project_id/error_tracking/autocapture_controls/: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/:project_id/error_tracking/autocapture_controls/:id/

Example response

Status 204 No response body

List all error tracking fingerprints

Required API key scopes

error_tracking:read

Path parameters

  • project_id
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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": [
{
"fingerprint": "string",
"issue_id": "117c70c4-891b-49ba-96f2-b7599e2af0f7",
"created_at": "2019-08-24T14:15:22Z"
}
]
}

Retrieve error tracking fingerprints

Required API key scopes

error_tracking:read

Path parameters

  • id
    string
  • project_id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"fingerprint": "string",
"issue_id": "117c70c4-891b-49ba-96f2-b7599e2af0f7",
"created_at": "2019-08-24T14:15:22Z"
}

Delete error tracking fingerprints

Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true

Required API key scopes

error_tracking:write

Path parameters

  • id
    string
  • project_id
    string

Example request

DELETE /api/environments/:project_id/error_tracking/fingerprints/: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/:project_id/error_tracking/fingerprints/:id/

Example response

Status 405 No response body





List all error tracking grouping rules

Required API key scopes

error_tracking:read

Path parameters

  • project_id
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"filters": null,
"assignee": "string",
"order_key": -2147483648,
"disabled_data": null
}
]
}

List all error tracking grouping rules

Required API key scopes

error_tracking:read

Path parameters

  • project_id
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"filters": null,
"assignee": "string",
"order_key": -2147483648,
"disabled_data": null
}
]
}

Create error tracking grouping rules

Required API key scopes

error_tracking:write

Path parameters

  • project_id
    string

Request parameters

  • filters
  • order_key
    integer
  • disabled_data

Response


Example request

POST /api/environments/:project_id/error_tracking/grouping_rules
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/:project_id/error_tracking/grouping_rules/\
-d filters=undefined,\
-d order_key="integer"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"filters": null,
"assignee": "string",
"order_key": -2147483648,
"disabled_data": null
}
Next page →

Community questions

Questions about this page? or post a community question.