{ "opencollection": "1.0.0", "info": { "name": "PostHog actions insights API", "version": "1.0.0" }, "items": [ { "info": { "name": "insights", "type": "folder" }, "items": [ { "info": { "name": "environments_insights_list", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/", "params": [ { "name": "basic", "value": "", "type": "query", "description": "Return basic insight metadata only (no results, faster)." }, { "name": "created_by", "value": "", "type": "query", "description": "JSON-encoded array of user IDs. Only returns insights whose `created_by` is in the list, e.g. `[1,42]`." }, { "name": "created_date_from", "value": "", "type": "query", "description": "Filter by `created_at > created_date_from`. Accepts absolute or relative dates." }, { "name": "created_date_to", "value": "", "type": "query", "description": "Filter by `created_at < created_date_to`. Accepts absolute or relative dates." }, { "name": "dashboards", "value": "", "type": "query", "description": "JSON-encoded array of dashboard IDs. Returns insights attached to every listed dashboard (AND)." }, { "name": "date_from", "value": "", "type": "query", "description": "Filter by `last_modified_at > date_from`. Accepts absolute dates (`2025-04-23`) or relative strings (`-7d`, `-1m`)." }, { "name": "date_to", "value": "", "type": "query", "description": "Filter by `last_modified_at < date_to`. Accepts absolute dates or relative strings." }, { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "favorited", "value": "", "type": "query", "description": "Include this parameter (any value) to restrict results to insights marked as favorited." }, { "name": "format", "value": "", "type": "query" }, { "name": "insight", "value": "", "type": "query", "description": "Restrict to a single insight type. `JSON` matches non-wrapper query insights; `SQL` matches HogQL queries." }, { "name": "last_viewed_date_from", "value": "", "type": "query", "description": "Filter by `last_viewed_at > last_viewed_date_from`. Accepts absolute or relative dates." }, { "name": "last_viewed_date_to", "value": "", "type": "query", "description": "Filter by `last_viewed_at < last_viewed_date_to`. Accepts absolute or relative dates." }, { "name": "limit", "value": "", "type": "query", "description": "Number of results to return per page." }, { "name": "offset", "value": "", "type": "query", "description": "The initial index from which to return the results." }, { "name": "refresh", "value": "", "type": "query", "description": "\nWhether to refresh the retrieved insights, how aggressively, and if sync or async:\n- `'force_cache'` - return cached data or a cache miss; always completes immediately as it never calculates\n- `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache\n- `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache\n- `'lazy_async'` - kick off background calculation, UNLESS there are somewhat fresh results in the cache\n- `'force_blocking'` - calculate synchronously, even if fresh results are already cached\n- `'force_async'` - kick off background calculation, even if fresh results are already cached\nBackground calculation can be tracked using the `query_status` response field." }, { "name": "saved", "value": "", "type": "query", "description": "When truthy, restricts results to insights that are saved (or attached to a visible dashboard). When falsy, only unsaved insights." }, { "name": "search", "value": "", "type": "query", "description": "Case-insensitive substring match across name, derived_name, description, and tag names." }, { "name": "short_id", "value": "", "type": "query" }, { "name": "tags", "value": "", "type": "query", "description": "JSON-encoded array of tag names. Returns insights with any of the listed tags." }, { "name": "user", "value": "", "type": "query", "description": "Include this parameter (any value) to restrict results to insights created by the authenticated user." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/environments/:environment_id/insights/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_sharing_list", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:insight_id/sharing/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "insight_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } } }, { "info": { "name": "environments_insights_sharing_passwords_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:insight_id/sharing/passwords/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "insight_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Create a new password for the sharing configuration." }, { "info": { "name": "environments_insights_sharing_passwords_destroy", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:insight_id/sharing/passwords/:password_id/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "insight_id", "value": "", "type": "path" }, { "name": "password_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Delete a password from the sharing configuration." }, { "info": { "name": "environments_insights_sharing_refresh_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:insight_id/sharing/refresh/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "insight_id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } } }, { "info": { "name": "environments_insights_thresholds_list", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:insight_id/thresholds/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "insight_id", "value": "", "type": "path" }, { "name": "limit", "value": "", "type": "query", "description": "Number of results to return per page." }, { "name": "offset", "value": "", "type": "query", "description": "The initial index from which to return the results." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } } }, { "info": { "name": "environments_insights_thresholds_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:insight_id/thresholds/:id/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "id", "value": "", "type": "path", "description": "A UUID string identifying this threshold." }, { "name": "insight_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } } }, { "info": { "name": "environments_insights_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:id/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" }, { "name": "from_dashboard", "value": "", "type": "query", "description": "\nOnly if loading an insight in the context of a dashboard: The relevant dashboard's ID.\nWhen set, the specified dashboard's filters and date range override will be applied." }, { "name": "id", "value": "", "type": "path", "description": "Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight." }, { "name": "refresh", "value": "", "type": "query", "description": "\nWhether to refresh the insight, how aggresively, and if sync or async:\n- `'force_cache'` - return cached data or a cache miss; always completes immediately as it never calculates\n- `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache\n- `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache\n- `'lazy_async'` - kick off background calculation, UNLESS there are somewhat fresh results in the cache\n- `'force_blocking'` - calculate synchronously, even if fresh results are already cached\n- `'force_async'` - kick off background calculation, even if fresh results are already cached\nBackground calculation can be tracked using the `query_status` response field." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_update", "type": "http" }, "http": { "method": "PUT", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:id/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_partial_update", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:id/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_destroy", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:id/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Hard delete of this model is not allowed. Use a patch API call to set \"deleted\" to true" }, { "info": { "name": "environments_insights_activity_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:id/activity/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "A unique integer value identifying this insight." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_analyze_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:id/analyze/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "A unique integer value identifying this insight." } ] }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_suggestions_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:id/suggestions/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "A unique integer value identifying this insight." } ] }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_suggestions_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/environments/:environment_id/insights/:id/suggestions/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "A unique integer value identifying this insight." } ], "body": { "type": "json", "data": "{}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_all_activity_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/activity/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_bulk_update_tags_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/environments/:environment_id/insights/bulk_update_tags/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Bulk update tags on multiple objects.\n\nAccepts:\n- {\"ids\": [...], \"action\": \"add\"|\"remove\"|\"set\", \"tags\": [\"tag1\", \"tag2\"]}\n\nActions:\n- \"add\": Add tags to existing tags on each object\n- \"remove\": Remove specific tags from each object\n- \"set\": Replace all tags on each object with the provided list" }, { "info": { "name": "environments_insights_cancel_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/environments/:environment_id/insights/cancel/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" } ], "body": { "type": "json", "data": "{}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "environments_insights_generate_metadata_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/environments/:environment_id/insights/generate_metadata/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Generate an AI-suggested name and description for an insight based on its query configuration." }, { "info": { "name": "environments_insights_my_last_viewed_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/my_last_viewed/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" } ] }, "docs": "Returns basic details about the last 5 insights viewed by this user. Most recently viewed first." }, { "info": { "name": "environments_insights_trending_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/environments/:environment_id/insights/trending/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" } ] }, "docs": "Returns trending insights based on view count in the last N days (default 7).\nDefaults to returning top 10 insights." }, { "info": { "name": "environments_insights_viewed_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/environments/:environment_id/insights/viewed/", "params": [ { "name": "environment_id", "value": "", "type": "path", "description": "Deprecated. Use /api/projects/{project_id}/ instead." }, { "name": "format", "value": "", "type": "query" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Update insight view timestamps.\nExpects: {\"insight_ids\": [1, 2, 3, ...]}" }, { "info": { "name": "insights_list", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/", "params": [ { "name": "basic", "value": "", "type": "query", "description": "Return basic insight metadata only (no results, faster)." }, { "name": "created_by", "value": "", "type": "query", "description": "JSON-encoded array of user IDs. Only returns insights whose `created_by` is in the list, e.g. `[1,42]`." }, { "name": "created_date_from", "value": "", "type": "query", "description": "Filter by `created_at > created_date_from`. Accepts absolute or relative dates." }, { "name": "created_date_to", "value": "", "type": "query", "description": "Filter by `created_at < created_date_to`. Accepts absolute or relative dates." }, { "name": "dashboards", "value": "", "type": "query", "description": "JSON-encoded array of dashboard IDs. Returns insights attached to every listed dashboard (AND)." }, { "name": "date_from", "value": "", "type": "query", "description": "Filter by `last_modified_at > date_from`. Accepts absolute dates (`2025-04-23`) or relative strings (`-7d`, `-1m`)." }, { "name": "date_to", "value": "", "type": "query", "description": "Filter by `last_modified_at < date_to`. Accepts absolute dates or relative strings." }, { "name": "favorited", "value": "", "type": "query", "description": "Include this parameter (any value) to restrict results to insights marked as favorited." }, { "name": "format", "value": "", "type": "query" }, { "name": "insight", "value": "", "type": "query", "description": "Restrict to a single insight type. `JSON` matches non-wrapper query insights; `SQL` matches HogQL queries." }, { "name": "last_viewed_date_from", "value": "", "type": "query", "description": "Filter by `last_viewed_at > last_viewed_date_from`. Accepts absolute or relative dates." }, { "name": "last_viewed_date_to", "value": "", "type": "query", "description": "Filter by `last_viewed_at < last_viewed_date_to`. Accepts absolute or relative dates." }, { "name": "limit", "value": "", "type": "query", "description": "Number of results to return per page." }, { "name": "offset", "value": "", "type": "query", "description": "The initial index from which to return the results." }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." }, { "name": "refresh", "value": "", "type": "query", "description": "\nWhether to refresh the retrieved insights, how aggressively, and if sync or async:\n- `'force_cache'` - return cached data or a cache miss; always completes immediately as it never calculates\n- `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache\n- `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache\n- `'lazy_async'` - kick off background calculation, UNLESS there are somewhat fresh results in the cache\n- `'force_blocking'` - calculate synchronously, even if fresh results are already cached\n- `'force_async'` - kick off background calculation, even if fresh results are already cached\nBackground calculation can be tracked using the `query_status` response field." }, { "name": "saved", "value": "", "type": "query", "description": "When truthy, restricts results to insights that are saved (or attached to a visible dashboard). When falsy, only unsaved insights." }, { "name": "search", "value": "", "type": "query", "description": "Case-insensitive substring match across name, derived_name, description, and tag names." }, { "name": "short_id", "value": "", "type": "query" }, { "name": "tags", "value": "", "type": "query", "description": "JSON-encoded array of tag names. Returns insights with any of the listed tags." }, { "name": "user", "value": "", "type": "query", "description": "Include this parameter (any value) to restrict results to insights created by the authenticated user." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/projects/:project_id/insights/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_sharing_list", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/:insight_id/sharing/", "params": [ { "name": "insight_id", "value": "", "type": "path" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } } }, { "info": { "name": "insights_sharing_passwords_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/projects/:project_id/insights/:insight_id/sharing/passwords/", "params": [ { "name": "insight_id", "value": "", "type": "path" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Create a new password for the sharing configuration." }, { "info": { "name": "insights_sharing_passwords_destroy", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/projects/:project_id/insights/:insight_id/sharing/passwords/:password_id/", "params": [ { "name": "insight_id", "value": "", "type": "path" }, { "name": "password_id", "value": "", "type": "path" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Delete a password from the sharing configuration." }, { "info": { "name": "insights_sharing_refresh_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/projects/:project_id/insights/:insight_id/sharing/refresh/", "params": [ { "name": "insight_id", "value": "", "type": "path" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } } }, { "info": { "name": "insights_thresholds_list", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/:insight_id/thresholds/", "params": [ { "name": "insight_id", "value": "", "type": "path" }, { "name": "limit", "value": "", "type": "query", "description": "Number of results to return per page." }, { "name": "offset", "value": "", "type": "query", "description": "The initial index from which to return the results." }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } } }, { "info": { "name": "insights_thresholds_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/:insight_id/thresholds/:id/", "params": [ { "name": "id", "value": "", "type": "path", "description": "A UUID string identifying this threshold." }, { "name": "insight_id", "value": "", "type": "path" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } } }, { "info": { "name": "insights_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/:id/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "from_dashboard", "value": "", "type": "query", "description": "\nOnly if loading an insight in the context of a dashboard: The relevant dashboard's ID.\nWhen set, the specified dashboard's filters and date range override will be applied." }, { "name": "id", "value": "", "type": "path", "description": "Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight." }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." }, { "name": "refresh", "value": "", "type": "query", "description": "\nWhether to refresh the insight, how aggresively, and if sync or async:\n- `'force_cache'` - return cached data or a cache miss; always completes immediately as it never calculates\n- `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache\n- `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache\n- `'lazy_async'` - kick off background calculation, UNLESS there are somewhat fresh results in the cache\n- `'force_blocking'` - calculate synchronously, even if fresh results are already cached\n- `'force_async'` - kick off background calculation, even if fresh results are already cached\nBackground calculation can be tracked using the `query_status` response field." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_update", "type": "http" }, "http": { "method": "PUT", "url": "{{baseUrl}}/api/projects/:project_id/insights/:id/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight." }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_partial_update", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/api/projects/:project_id/insights/:id/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight." }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_destroy", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/projects/:project_id/insights/:id/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight." }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Hard delete of this model is not allowed. Use a patch API call to set \"deleted\" to true" }, { "info": { "name": "insights_activity_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/:id/activity/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "A unique integer value identifying this insight." }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_analyze_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/:id/analyze/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "A unique integer value identifying this insight." }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ] }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_suggestions_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/:id/suggestions/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "A unique integer value identifying this insight." }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ] }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_suggestions_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/projects/:project_id/insights/:id/suggestions/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "id", "value": "", "type": "path", "description": "A unique integer value identifying this insight." }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "body": { "type": "json", "data": "{}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_all_activity_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/activity/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_bulk_update_tags_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/projects/:project_id/insights/bulk_update_tags/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Bulk update tags on multiple objects.\n\nAccepts:\n- {\"ids\": [...], \"action\": \"add\"|\"remove\"|\"set\", \"tags\": [\"tag1\", \"tag2\"]}\n\nActions:\n- \"add\": Add tags to existing tags on each object\n- \"remove\": Remove specific tags from each object\n- \"set\": Replace all tags on each object with the provided list" }, { "info": { "name": "insights_cancel_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/projects/:project_id/insights/cancel/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "body": { "type": "json", "data": "{}" } }, "docs": "DRF ViewSet mixin that gates coalesced responses behind permission checks.\n\nThe QueryCoalescingMiddleware attaches cached response data to\nrequest.META[\"_coalesced_response\"] for followers. This mixin runs DRF's\ninitial() (auth + permissions + throttling) before returning the\ncached response, ensuring the request is authorized." }, { "info": { "name": "insights_generate_metadata_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/projects/:project_id/insights/generate_metadata/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Generate an AI-suggested name and description for an insight based on its query configuration." }, { "info": { "name": "insights_my_last_viewed_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/my_last_viewed/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ] }, "docs": "Returns basic details about the last 5 insights viewed by this user. Most recently viewed first." }, { "info": { "name": "insights_trending_retrieve", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/projects/:project_id/insights/trending/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ] }, "docs": "Returns trending insights based on view count in the last N days (default 7).\nDefaults to returning top 10 insights." }, { "info": { "name": "insights_viewed_create", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/projects/:project_id/insights/viewed/", "params": [ { "name": "format", "value": "", "type": "query" }, { "name": "project_id", "value": "", "type": "path", "description": "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Update insight view timestamps.\nExpects: {\"insight_ids\": [1, 2, 3, ...]}" } ] } ], "bundled": true }