Dashboard

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

List all dashboard templates

Required API key scopes

dashboard_template:read

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Query parameters

  • limit
    integer

    Number of results to return per page.

  • offset
    integer

    The initial index from which to return the results.

Response


Request

GET /api/projects/:project_id/dashboard_templates
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
https://app.posthog.com/api/projects/:project_id/dashboard_templates/

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",
"template_name": "string",
"dashboard_description": "string",
"dashboard_filters": null,
"tags": [
"string"
],
"tiles": null,
"variables": null,
"deleted": true,
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"image_url": "string",
"team_id": 0,
"scope": "team"
}
]
}

Create dashboard templates

Required API key scopes

dashboard_template:write

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request parameters

  • template_name
    string
  • dashboard_description
    string
  • dashboard_filters
  • tags
    array
  • tiles
  • variables
  • deleted
    boolean
  • created_by
    integer
  • image_url
    string
  • scope

Response


Request

POST /api/projects/:project_id/dashboard_templates
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
https://app.posthog.com/api/projects/:project_id/dashboard_templates/\
-d template_name="string"

Response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"template_name": "string",
"dashboard_description": "string",
"dashboard_filters": null,
"tags": [
"string"
],
"tiles": null,
"variables": null,
"deleted": true,
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"image_url": "string",
"team_id": 0,
"scope": "team"
}

Retrieve dashboard templates

Required API key scopes

dashboard_template:read

Path parameters

  • id
    string

    A UUID string identifying this dashboard template.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Response


Request

GET /api/projects/:project_id/dashboard_templates/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
https://app.posthog.com/api/projects/:project_id/dashboard_templates/:id/

Response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"template_name": "string",
"dashboard_description": "string",
"dashboard_filters": null,
"tags": [
"string"
],
"tiles": null,
"variables": null,
"deleted": true,
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"image_url": "string",
"team_id": 0,
"scope": "team"
}

Update dashboard templates

Required API key scopes

dashboard_template:write

Path parameters

  • id
    string

    A UUID string identifying this dashboard template.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request parameters

  • template_name
    string
  • dashboard_description
    string
  • dashboard_filters
  • tags
    array
  • tiles
  • variables
  • deleted
    boolean
  • created_by
    integer
  • image_url
    string
  • scope

Response


Request

PATCH /api/projects/:project_id/dashboard_templates/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
https://app.posthog.com/api/projects/:project_id/dashboard_templates/:id/\
-d template_name="string"

Response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"template_name": "string",
"dashboard_description": "string",
"dashboard_filters": null,
"tags": [
"string"
],
"tiles": null,
"variables": null,
"deleted": true,
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"image_url": "string",
"team_id": 0,
"scope": "team"
}

Delete dashboard templates

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

Required API key scopes

dashboard_template:write

Path parameters

  • id
    string

    A UUID string identifying this dashboard template.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Request

DELETE /api/projects/:project_id/dashboard_templates/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
https://app.posthog.com/api/projects/:project_id/dashboard_templates/:id/

Response

Status 405 No response body

Retrieve dashboard templates json schema

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Response


Request

GET /api/projects/:project_id/dashboard_templates/json_schema
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
https://app.posthog.com/api/projects/:project_id/dashboard_templates/json_schema/

Response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"template_name": "string",
"dashboard_description": "string",
"dashboard_filters": null,
"tags": [
"string"
],
"tiles": null,
"variables": null,
"deleted": true,
"created_at": "2019-08-24T14:15:22Z",
"created_by": 0,
"image_url": "string",
"team_id": 0,
"scope": "team"
}

Questions?

Was this page useful?