Context

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

Endpoints

GET
GET
GET

Retrieve context layer status

The organization's context wiki: a git repo of Markdown pages hosted by PostHog.

Required API key scopes

organization:read

Response


Example request

GET /api/organizations/:organization_id/context_layer/status
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/context_layer/status/

Example response

Status 200
RESPONSE
{
"head_sha": "string"
}
Status 404 The context layer is not enabled.

Retrieve context layer status

The organization's context wiki: a git repo of Markdown pages hosted by PostHog.

Required API key scopes

organization:read

Response


Example request

GET /api/organizations/:organization_id/context_layer/status
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/context_layer/status/

Example response

Status 200
RESPONSE
{
"head_sha": "string"
}
Status 404 The context layer is not enabled.

Retrieve context layer tree

The organization's context wiki: a git repo of Markdown pages hosted by PostHog.

Required API key scopes

organization:read

Response


Example request

GET /api/organizations/:organization_id/context_layer/tree
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/context_layer/tree/

Example response

Status 200
RESPONSE
{
"head_sha": "string",
"paths": [
"string"
]
}
Status 404 The context layer is not enabled.

Retrieve context layer tree

The organization's context wiki: a git repo of Markdown pages hosted by PostHog.

Required API key scopes

organization:read

Response


Example request

GET /api/organizations/:organization_id/context_layer/tree
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/context_layer/tree/

Example response

Status 200
RESPONSE
{
"head_sha": "string",
"paths": [
"string"
]
}
Status 404 The context layer is not enabled.

Retrieve context layer wiki report

The organization's context wiki: a git repo of Markdown pages hosted by PostHog.

Required API key scopes

organization:read

Response


Example request

GET /api/organizations/:organization_id/context_layer/wiki/report
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/context_layer/wiki/report/

Example response

Status 200
RESPONSE
{
"head_sha": "string",
"findings": [
{
"category": "string",
"path": "string",
"message": "string"
}
]
}

Retrieve context layer wiki report

The organization's context wiki: a git repo of Markdown pages hosted by PostHog.

Required API key scopes

organization:read

Response


Example request

GET /api/organizations/:organization_id/context_layer/wiki/report
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/context_layer/wiki/report/

Example response

Status 200
RESPONSE
{
"head_sha": "string",
"findings": [
{
"category": "string",
"path": "string",
"message": "string"
}
]
}