Cross Project

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

Endpoints

GET
POST
GET
POST
GET
PATCH
DELETE
GET
PATCH
DELETE

List all cross project dashboards

Dashboards the organization owns, holding insights from one or more projects.

Required API key scopes

cross_project_dashboard:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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",
"name": "string",
"description": "string",
"filters": null,
"tile_count": 0,
"project_count": 0,
"created_by": {
"id": 0,
"first_name": "string",
"email": "user@example.com"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}

Create cross project dashboards

Dashboards the organization owns, holding insights from one or more projects.

Required API key scopes

cross_project_dashboard:write

Request parameters

  • name
    string
  • description
    string
    Default:
  • filters

Response


Example request

POST /api/organizations/:organization_id/cross_project_dashboards
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/organizations/:organization_id/cross_project_dashboards/\
-d name="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "",
"filters": null,
"tiles": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}
],
"created_by": {
"id": 0,
"first_name": "string",
"email": "user@example.com"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

List all cross project dashboards tiles

Tiles on one cross-project dashboard, edited one at a time.

Writes are per tile rather than a whole-set replace, so two people editing the same dashboard cannot overwrite each other's tiles.

Required API key scopes

cross_project_dashboard:read

Path parameters

  • dashboard_id
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}
]
}

Create cross project dashboards tiles

Tiles on one cross-project dashboard, edited one at a time.

Writes are per tile rather than a whole-set replace, so two people editing the same dashboard cannot overwrite each other's tiles.

Required API key scopes

cross_project_dashboard:write

Path parameters

  • dashboard_id
    string

Request parameters

  • project_id
    integer
  • insight_id
    integer
  • layouts
  • color
    string | null
  • filters_overrides

Response


Example request

POST /api/organizations/:organization_id/cross_project_dashboards/:dashboard_id/tiles
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/organizations/:organization_id/cross_project_dashboards/:dashboard_id/tiles/\
-d project_id="integer",\
-d insight_id="integer"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}

Retrieve cross project dashboards tiles

Tiles on one cross-project dashboard, edited one at a time.

Writes are per tile rather than a whole-set replace, so two people editing the same dashboard cannot overwrite each other's tiles.

Required API key scopes

cross_project_dashboard:read

Path parameters

  • dashboard_id
    string
  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}

Update cross project dashboards tiles

Tiles on one cross-project dashboard, edited one at a time.

Writes are per tile rather than a whole-set replace, so two people editing the same dashboard cannot overwrite each other's tiles.

Required API key scopes

cross_project_dashboard:write

Path parameters

  • dashboard_id
    string
  • id
    string

Request parameters

  • layouts
  • color
    string | null
  • filters_overrides

Response


Example request

PATCH /api/organizations/:organization_id/cross_project_dashboards/:dashboard_id/tiles/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/cross_project_dashboards/:dashboard_id/tiles/:id/\
-d layouts=undefined

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}

Delete cross project dashboards tiles

Tiles on one cross-project dashboard, edited one at a time.

Writes are per tile rather than a whole-set replace, so two people editing the same dashboard cannot overwrite each other's tiles.

Required API key scopes

cross_project_dashboard:write

Path parameters

  • dashboard_id
    string
  • id
    string

Example request

DELETE /api/organizations/:organization_id/cross_project_dashboards/:dashboard_id/tiles/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/cross_project_dashboards/:dashboard_id/tiles/:id/

Example response

Status 204 No response body

Retrieve cross project dashboards

Dashboards the organization owns, holding insights from one or more projects.

Required API key scopes

cross_project_dashboard:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "",
"filters": null,
"tiles": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}
],
"created_by": {
"id": 0,
"first_name": "string",
"email": "user@example.com"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Update cross project dashboards

Dashboards the organization owns, holding insights from one or more projects.

Required API key scopes

cross_project_dashboard:write

Path parameters

  • id
    string

Request parameters

  • name
    string
  • description
    string
    Default:
  • filters

Response


Example request

PATCH /api/organizations/:organization_id/cross_project_dashboards/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/organizations/:organization_id/cross_project_dashboards/:id/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "",
"filters": null,
"tiles": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"project_id": 0,
"insight_id": 0,
"layouts": null,
"color": "string",
"filters_overrides": null
}
],
"created_by": {
"id": 0,
"first_name": "string",
"email": "user@example.com"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Delete cross project dashboards

Dashboards the organization owns, holding insights from one or more projects.

Required API key scopes

cross_project_dashboard:write

Path parameters

  • id
    string

Example request

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

Example response

Status 204 No response body