Error tracking

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

Endpoints

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

List all error tracking external references

Required API key scopes

error_tracking:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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",
"integration": {
"id": 0,
"kind": "string",
"display_name": "string"
},
"external_url": "string"
}
]
}

Create error tracking external references

Required API key scopes

error_tracking:write

Request parameters

  • integration_id
    integer
  • config
    object
  • issue
    string

Response


Example request

POST /api/projects/:project_id/error_tracking/external_references
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/error_tracking/external_references/\
-d integration_id="integer",\
-d config="object",\
-d issue="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"integration": {
"id": 0,
"kind": "string",
"display_name": "string"
},
"external_url": "string"
}

Retrieve error tracking external references

Required API key scopes

error_tracking:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"integration": {
"id": 0,
"kind": "string",
"display_name": "string"
},
"external_url": "string"
}

Delete error tracking external references

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

Path parameters

  • id
    string

Example request

DELETE /api/projects/:project_id/error_tracking/external_references/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/error_tracking/external_references/:id/

Example response

Status 405 No response body

Create error tracking external references link issue

Link an error to an issue that already exists in the connected provider.

Required API key scopes

error_tracking:write

Request parameters

  • integration_id
    integer
  • issue
    string
  • external_context
    object

Response


Example request

POST /api/projects/:project_id/error_tracking/external_references/link_issue
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/error_tracking/external_references/link_issue/\
-d integration_id="integer",\
-d issue="string",\
-d external_context="object"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"integration": {
"id": 0,
"kind": "string",
"display_name": "string"
},
"external_url": "string"
}

Retrieve error tracking external references search issues

Search a connected provider for existing issues to link an error to.

Required API key scopes

error_tracking:readintegration:read

Query parameters

  • integration_id
    integer
  • repository
    string
  • search
    string
    Default:

Response


Example request

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

Example response

Status 200
RESPONSE
{
"issues": [
{
"id": "string",
"title": "string",
"url": "string",
"external_context": {}
}
]
}

List all error tracking fingerprints

Required API key scopes

error_tracking:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

GET /api/projects/: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/projects/: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": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"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

Response


Example request

GET /api/projects/: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/projects/:project_id/error_tracking/fingerprints/:id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"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

Path parameters

  • id
    string

Example request

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

Example response

Status 405 No response body

Retrieve error tracking fingerprints resolve

Required API key scopes

error_tracking:read

Query parameters

  • fingerprint
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"fingerprint": "string",
"issue_id": "117c70c4-891b-49ba-96f2-b7599e2af0f7",
"created_at": "2019-08-24T14:15:22Z"
}



List all error tracking grouping rules

Also available via the PostHog MCP server:

  • error-tracking-grouping-rules-listList error tracking grouping rules

Required API key scopes

error_tracking:read

Response


Example request

GET /api/projects/: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/projects/:project_id/error_tracking/grouping_rules/

Example response

Status 200
RESPONSE
{
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"filters": null,
"assignee": {
"type": "user",
"id": 0
},
"description": "string",
"issue": {
"property1": "string",
"property2": "string"
},
"order_key": 0,
"disabled_data": null,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}

Create error tracking grouping rules

Also available via the PostHog MCP server:

  • error-tracking-grouping-rules-createCreate error tracking grouping rule

Required API key scopes

error_tracking:write

Request parameters

  • filters
  • assignee
  • description
    stringnull

Response


Example request

POST /api/projects/: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/projects/:project_id/error_tracking/grouping_rules/\
-d filters=undefined

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"filters": null,
"assignee": {
"type": "user",
"id": 0
},
"description": "string",
"issue": {
"property1": "string",
"property2": "string"
},
"order_key": 0,
"disabled_data": null,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Retrieve error tracking grouping rules

Required API key scopes

error_tracking:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"filters": null,
"assignee": {
"type": "user",
"id": 0
},
"description": "string",
"issue": {
"property1": "string",
"property2": "string"
},
"order_key": 0,
"disabled_data": null,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Update error tracking grouping rules

Required API key scopes

error_tracking:write

Path parameters

  • id
    string

Request parameters

  • filters

Example request

PATCH /api/projects/:project_id/error_tracking/grouping_rules/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/error_tracking/grouping_rules/:id/\
-d filters=undefined

Example response

Status 204 No response body

Delete error tracking grouping rules

Required API key scopes

error_tracking:write

Path parameters

  • id
    string

Example request

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

Example response

Status 204 No response body

Update error tracking grouping rules reorder

Required API key scopes

error_tracking:write

Request parameters

  • filters
  • description
    stringnull
  • order_key
    integer
  • disabled_data

Example request

PATCH /api/projects/:project_id/error_tracking/grouping_rules/reorder
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/error_tracking/grouping_rules/reorder/\
-d filters=undefined

Example response

Status 200 No response body

List all error tracking issues

Required API key scopes

error_tracking:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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",
"status": "string",
"severity": "low",
"name": "string",
"description": "string",
"first_seen": "2019-08-24T14:15:22Z",
"assignee": {
"id": 0,
"type": "string"
},
"external_issues": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"integration": {
"id": 0,
"kind": "string",
"display_name": "string"
},
"external_url": "string"
}
],
"cohort": {
"id": 0,
"name": "string"
}
}
]
}