Environments-14

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

Retrieve environments hog functions icons

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

Status 200 No response body

Retrieve environments hog functions icons

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

Status 200 No response body

Update environments hog functions rearrange

Update the execution order of multiple HogFunctions.

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

Status 200 No response body

Update environments hog functions rearrange

Update the execution order of multiple HogFunctions.

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

Status 200 No response body

List all environments insights

Required API key scopes

insight: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

  • basic
    boolean

    Return basic insight metadata only (no results, faster).

  • created_by
    integer
  • format
    string
    One of: "csv""json"
  • limit
    integer

    Number of results to return per page.

  • offset
    integer

    The initial index from which to return the results.

  • refresh
    string
    Default: force_cache
    One of: "async""async_except_on_cache_miss""blocking""force_async""force_blocking""force_cache""lazy_async"

    Whether to refresh the retrieved insights, how aggresively, and if sync or async:

    • 'force_cache' - return cached data or a cache miss; always completes immediately as it never calculates
    • 'blocking' - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache
    • 'async' - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache
    • 'lazy_async' - kick off background calculation, UNLESS there are somewhat fresh results in the cache
    • 'force_blocking' - calculate synchronously, even if fresh results are already cached
    • 'force_async' - kick off background calculation, even if fresh results are already cached Background calculation can be tracked using the query_status response field.
  • short_id
    string

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": 0,
"short_id": "string",
"name": "string",
"derived_name": "string",
"query": {
"kind": "InsightVizNode",
"source": {
"kind": "TrendsQuery",
"series": [
{
"kind": "EventsNode",
"math": "total",
"name": "$pageview",
"event": "$pageview",
"version": 1
}
],
"version": 1
},
"version": 1
},
"order": -2147483648,
"deleted": true,
"dashboards": [
0
],
"dashboard_tiles": [
{
"id": 0,
"dashboard_id": 0,
"deleted": true
}
],
"last_refresh": "string",
"cache_target_age": "string",
"next_allowed_client_refresh": "string",
"result": "string",
"hasMore": "string",
"columns": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"description": "string",
"updated_at": "2019-08-24T14:15:22Z",
"tags": [
null
],
"favorited": true,
"last_modified_at": "2019-08-24T14:15:22Z",
"last_modified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"is_sample": true,
"effective_restriction_level": 21,
"effective_privilege_level": 21,
"user_access_level": "string",
"timezone": "string",
"is_cached": "string",
"query_status": "string",
"hogql": "string",
"types": "string",
"_create_in_folder": "string",
"alerts": "string"
}
]
}

List all environments insights

Required API key scopes

insight: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

  • basic
    boolean

    Return basic insight metadata only (no results, faster).

  • created_by
    integer
  • format
    string
    One of: "csv""json"
  • limit
    integer

    Number of results to return per page.

  • offset
    integer

    The initial index from which to return the results.

  • refresh
    string
    Default: force_cache
    One of: "async""async_except_on_cache_miss""blocking""force_async""force_blocking""force_cache""lazy_async"

    Whether to refresh the retrieved insights, how aggresively, and if sync or async:

    • 'force_cache' - return cached data or a cache miss; always completes immediately as it never calculates
    • 'blocking' - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache
    • 'async' - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache
    • 'lazy_async' - kick off background calculation, UNLESS there are somewhat fresh results in the cache
    • 'force_blocking' - calculate synchronously, even if fresh results are already cached
    • 'force_async' - kick off background calculation, even if fresh results are already cached Background calculation can be tracked using the query_status response field.
  • short_id
    string

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": 0,
"short_id": "string",
"name": "string",
"derived_name": "string",
"query": {
"kind": "InsightVizNode",
"source": {
"kind": "TrendsQuery",
"series": [
{
"kind": "EventsNode",
"math": "total",
"name": "$pageview",
"event": "$pageview",
"version": 1
}
],
"version": 1
},
"version": 1
},
"order": -2147483648,
"deleted": true,
"dashboards": [
0
],
"dashboard_tiles": [
{
"id": 0,
"dashboard_id": 0,
"deleted": true
}
],
"last_refresh": "string",
"cache_target_age": "string",
"next_allowed_client_refresh": "string",
"result": "string",
"hasMore": "string",
"columns": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"description": "string",
"updated_at": "2019-08-24T14:15:22Z",
"tags": [
null
],
"favorited": true,
"last_modified_at": "2019-08-24T14:15:22Z",
"last_modified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"is_sample": true,
"effective_restriction_level": 21,
"effective_privilege_level": 21,
"user_access_level": "string",
"timezone": "string",
"is_cached": "string",
"query_status": "string",
"hogql": "string",
"types": "string",
"_create_in_folder": "string",
"alerts": "string"
}
]
}

Create environments insights

Required API key scopes

insight: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/.


Query parameters

  • format
    string
    One of: "csv""json"

Response

Status 201
RESPONSE
{
"id": 0,
"short_id": "string",
"name": "string",
"derived_name": "string",
"query": {
"kind": "InsightVizNode",
"source": {
"kind": "TrendsQuery",
"series": [
{
"kind": "EventsNode",
"math": "total",
"name": "$pageview",
"event": "$pageview",
"version": 1
}
],
"version": 1
},
"version": 1
},
"order": -2147483648,
"deleted": true,
"dashboards": [
0
],
"dashboard_tiles": [
{
"id": 0,
"dashboard_id": 0,
"deleted": true
}
],
"last_refresh": "string",
"cache_target_age": "string",
"next_allowed_client_refresh": "string",
"result": "string",
"hasMore": "string",
"columns": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"description": "string",
"updated_at": "2019-08-24T14:15:22Z",
"tags": [
null
],
"favorited": true,
"last_modified_at": "2019-08-24T14:15:22Z",
"last_modified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"is_sample": true,
"effective_restriction_level": 21,
"effective_privilege_level": 21,
"user_access_level": "string",
"timezone": "string",
"is_cached": "string",
"query_status": "string",
"hogql": "string",
"types": "string",
"_create_in_folder": "string",
"alerts": "string"
}

Create environments insights

Required API key scopes

insight: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/.


Query parameters

  • format
    string
    One of: "csv""json"

Response

Status 201
RESPONSE
{
"id": 0,
"short_id": "string",
"name": "string",
"derived_name": "string",
"query": {
"kind": "InsightVizNode",
"source": {
"kind": "TrendsQuery",
"series": [
{
"kind": "EventsNode",
"math": "total",
"name": "$pageview",
"event": "$pageview",
"version": 1
}
],
"version": 1
},
"version": 1
},
"order": -2147483648,
"deleted": true,
"dashboards": [
0
],
"dashboard_tiles": [
{
"id": 0,
"dashboard_id": 0,
"deleted": true
}
],
"last_refresh": "string",
"cache_target_age": "string",
"next_allowed_client_refresh": "string",
"result": "string",
"hasMore": "string",
"columns": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"description": "string",
"updated_at": "2019-08-24T14:15:22Z",
"tags": [
null
],
"favorited": true,
"last_modified_at": "2019-08-24T14:15:22Z",
"last_modified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"is_sample": true,
"effective_restriction_level": 21,
"effective_privilege_level": 21,
"user_access_level": "string",
"timezone": "string",
"is_cached": "string",
"query_status": "string",
"hogql": "string",
"types": "string",
"_create_in_folder": "string",
"alerts": "string"
}

List all environments insights sharing

Required API key scopes

sharing_configuration:read

Path parameters

  • insight_id
    integer
  • 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

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": "string"
}

List all environments insights sharing

Required API key scopes

sharing_configuration:read

Path parameters

  • insight_id
    integer
  • 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

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": "string"
}

Create environments insights sharing passwords

Create a new password for the sharing configuration.

Required API key scopes

sharing_configuration:write

Path parameters

  • insight_id
    integer
  • 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

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": "string"
}

Create environments insights sharing passwords

Create a new password for the sharing configuration.

Required API key scopes

sharing_configuration:write

Path parameters

  • insight_id
    integer
  • 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

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": "string"
}

Delete environments insights sharing passwords

Delete a password from the sharing configuration.

Required API key scopes

sharing_configuration:write

Path parameters

  • insight_id
    integer
  • password_id
    string
  • 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

Status 204 No response body

Delete environments insights sharing passwords

Delete a password from the sharing configuration.

Required API key scopes

sharing_configuration:write

Path parameters

  • insight_id
    integer
  • password_id
    string
  • 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

Status 204 No response body

Create environments insights sharing refresh

Required API key scopes

sharing_configuration:write

Path parameters

  • insight_id
    integer
  • 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

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": "string"
}

Create environments insights sharing refresh

Required API key scopes

sharing_configuration:write

Path parameters

  • insight_id
    integer
  • 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

Status 200
RESPONSE
{
"created_at": "2019-08-24T14:15:22Z",
"enabled": true,
"access_token": "string",
"settings": null,
"password_required": true,
"share_passwords": "string"
}

Retrieve environments insights

Required API key scopes

insight:read

Path parameters

  • id
    integer

    A unique integer value identifying this insight.

  • 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

  • format
    string
    One of: "csv""json"
  • from_dashboard
    integer

    Only if loading an insight in the context of a dashboard: The relevant dashboard's ID. When set, the specified dashboard's filters and date range override will be applied.

  • refresh
    string
    Default: force_cache
    One of: "async""async_except_on_cache_miss""blocking""force_async""force_blocking""force_cache""lazy_async"

    Whether to refresh the insight, how aggresively, and if sync or async:

    • 'force_cache' - return cached data or a cache miss; always completes immediately as it never calculates
    • 'blocking' - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache
    • 'async' - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache
    • 'lazy_async' - kick off background calculation, UNLESS there are somewhat fresh results in the cache
    • 'force_blocking' - calculate synchronously, even if fresh results are already cached
    • 'force_async' - kick off background calculation, even if fresh results are already cached Background calculation can be tracked using the query_status response field.

Response

Status 200
RESPONSE
{
"id": 0,
"short_id": "string",
"name": "string",
"derived_name": "string",
"query": {
"kind": "InsightVizNode",
"source": {
"kind": "TrendsQuery",
"series": [
{
"kind": "EventsNode",
"math": "total",
"name": "$pageview",
"event": "$pageview",
"version": 1
}
],
"version": 1
},
"version": 1
},
"order": -2147483648,
"deleted": true,
"dashboards": [
0
],
"dashboard_tiles": [
{
"id": 0,
"dashboard_id": 0,
"deleted": true
}
],
"last_refresh": "string",
"cache_target_age": "string",
"next_allowed_client_refresh": "string",
"result": "string",
"hasMore": "string",
"columns": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"description": "string",
"updated_at": "2019-08-24T14:15:22Z",
"tags": [
null
],
"favorited": true,
"last_modified_at": "2019-08-24T14:15:22Z",
"last_modified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"is_sample": true,
"effective_restriction_level": 21,
"effective_privilege_level": 21,
"user_access_level": "string",
"timezone": "string",
"is_cached": "string",
"query_status": "string",
"hogql": "string",
"types": "string",
"_create_in_folder": "string",
"alerts": "string"
}

Retrieve environments insights

Required API key scopes

insight:read

Path parameters

  • id
    integer

    A unique integer value identifying this insight.

  • 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

  • format
    string
    One of: "csv""json"
  • from_dashboard
    integer

    Only if loading an insight in the context of a dashboard: The relevant dashboard's ID. When set, the specified dashboard's filters and date range override will be applied.

  • refresh
    string
    Default: force_cache
    One of: "async""async_except_on_cache_miss""blocking""force_async""force_blocking""force_cache""lazy_async"

    Whether to refresh the insight, how aggresively, and if sync or async:

    • 'force_cache' - return cached data or a cache miss; always completes immediately as it never calculates
    • 'blocking' - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache
    • 'async' - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache
    • 'lazy_async' - kick off background calculation, UNLESS there are somewhat fresh results in the cache
    • 'force_blocking' - calculate synchronously, even if fresh results are already cached
    • 'force_async' - kick off background calculation, even if fresh results are already cached Background calculation can be tracked using the query_status response field.

Response

Status 200
RESPONSE
{
"id": 0,
"short_id": "string",
"name": "string",
"derived_name": "string",
"query": {
"kind": "InsightVizNode",
"source": {
"kind": "TrendsQuery",
"series": [
{
"kind": "EventsNode",
"math": "total",
"name": "$pageview",
"event": "$pageview",
"version": 1
}
],
"version": 1
},
"version": 1
},
"order": -2147483648,
"deleted": true,
"dashboards": [
0
],
"dashboard_tiles": [
{
"id": 0,
"dashboard_id": 0,
"deleted": true
}
],
"last_refresh": "string",
"cache_target_age": "string",
"next_allowed_client_refresh": "string",
"result": "string",
"hasMore": "string",
"columns": "string",
"created_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"description": "string",
"updated_at": "2019-08-24T14:15:22Z",
"tags": [
null
],
"favorited": true,
"last_modified_at": "2019-08-24T14:15:22Z",
"last_modified_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {
"property1": null,
"property2": null
},
"role_at_organization": "engineering"
},
"is_sample": true,
"effective_restriction_level": 21,
"effective_privilege_level": 21,
"user_access_level": "string",
"timezone": "string",
"is_cached": "string",
"query_status": "string",
"hogql": "string",
"types": "string",
"_create_in_folder": "string",
"alerts": "string"
}
Next page →

Community questions

Questions about this page? or post a community question.