PostHog · Capability

PostHog API — insights

PostHog API — insights. 46 operations. Lead operation: insights. Self-contained Naftiko capability covering one Posthog business surface.

Run with Naftiko Posthoginsights

What You Can Do

GET
Environmentsinsightslist — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights
POST
Environmentsinsightscreate — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights
GET
Environmentsinsightsallactivityretrieve — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights/activity
POST
Environmentsinsightsbulkupdatetagscreate — Bulk update tags on multiple objects.
/v1/api/environments/{environment-id}/insights/bulk-update-tags
POST
Environmentsinsightscancelcreate — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights/cancel
POST
Environmentsinsightsgeneratemetadatacreate — Generate an AI-suggested name and description for an insight based on its query configuration.
/v1/api/environments/{environment-id}/insights/generate-metadata
GET
Environmentsinsightsmylastviewedretrieve — Returns basic details about the last 5 insights viewed by this user. Most recently viewed first.
/v1/api/environments/{environment-id}/insights/my-last-viewed
GET
Environmentsinsightstrendingretrieve — Returns trending insights based on view count in the last N days (default 7).
/v1/api/environments/{environment-id}/insights/trending
POST
Environmentsinsightsviewedcreate — Update insight view timestamps.
/v1/api/environments/{environment-id}/insights/viewed
GET
Environmentsinsightsretrieve — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights/{id}
PUT
Environmentsinsightsupdate — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights/{id}
PATCH
Environmentsinsightspartialupdate — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights/{id}
DELETE
Environmentsinsightsdestroy — Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
/v1/api/environments/{environment-id}/insights/{id}
GET
Environmentsinsightsactivityretrieve — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights/{id}/activity
GET
Environmentsinsightsanalyzeretrieve — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights/{id}/analyze
GET
Environmentsinsightssuggestionsretrieve — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights/{id}/suggestions
POST
Environmentsinsightssuggestionscreate — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/environments/{environment-id}/insights/{id}/suggestions
GET
Environmentsinsightssharinglist — environmentsinsightssharinglist
/v1/api/environments/{environment-id}/insights/{insight-id}/sharing
POST
Environmentsinsightssharingpasswordscreate — Create a new password for the sharing configuration.
/v1/api/environments/{environment-id}/insights/{insight-id}/sharing/passwords
DELETE
Environmentsinsightssharingpasswordsdestroy — Delete a password from the sharing configuration.
/v1/api/environments/{environment-id}/insights/{insight-id}/sharing/passwords/{password-id}
POST
Environmentsinsightssharingrefreshcreate — environmentsinsightssharingrefreshcreate
/v1/api/environments/{environment-id}/insights/{insight-id}/sharing/refresh
GET
Environmentsinsightsthresholdslist — environmentsinsightsthresholdslist
/v1/api/environments/{environment-id}/insights/{insight-id}/thresholds
GET
Environmentsinsightsthresholdsretrieve — environmentsinsightsthresholdsretrieve
/v1/api/environments/{environment-id}/insights/{insight-id}/thresholds/{id}
GET
Insightslist — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights
POST
Insightscreate — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights
GET
Insightsallactivityretrieve — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights/activity
POST
Insightsbulkupdatetagscreate — Bulk update tags on multiple objects.
/v1/api/projects/{project-id}/insights/bulk-update-tags
POST
Insightscancelcreate — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights/cancel
POST
Insightsgeneratemetadatacreate — Generate an AI-suggested name and description for an insight based on its query configuration.
/v1/api/projects/{project-id}/insights/generate-metadata
GET
Insightsmylastviewedretrieve — Returns basic details about the last 5 insights viewed by this user. Most recently viewed first.
/v1/api/projects/{project-id}/insights/my-last-viewed
GET
Insightstrendingretrieve — Returns trending insights based on view count in the last N days (default 7).
/v1/api/projects/{project-id}/insights/trending
POST
Insightsviewedcreate — Update insight view timestamps.
/v1/api/projects/{project-id}/insights/viewed
GET
Insightsretrieve — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights/{id}
PUT
Insightsupdate — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights/{id}
PATCH
Insightspartialupdate — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights/{id}
DELETE
Insightsdestroy — Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
/v1/api/projects/{project-id}/insights/{id}
GET
Insightsactivityretrieve — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights/{id}/activity
GET
Insightsanalyzeretrieve — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights/{id}/analyze
GET
Insightssuggestionsretrieve — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights/{id}/suggestions
POST
Insightssuggestionscreate — DRF ViewSet mixin that gates coalesced responses behind permission checks.
/v1/api/projects/{project-id}/insights/{id}/suggestions
GET
Insightssharinglist — insightssharinglist
/v1/api/projects/{project-id}/insights/{insight-id}/sharing
POST
Insightssharingpasswordscreate — Create a new password for the sharing configuration.
/v1/api/projects/{project-id}/insights/{insight-id}/sharing/passwords
DELETE
Insightssharingpasswordsdestroy — Delete a password from the sharing configuration.
/v1/api/projects/{project-id}/insights/{insight-id}/sharing/passwords/{password-id}
POST
Insightssharingrefreshcreate — insightssharingrefreshcreate
/v1/api/projects/{project-id}/insights/{insight-id}/sharing/refresh
GET
Insightsthresholdslist — insightsthresholdslist
/v1/api/projects/{project-id}/insights/{insight-id}/thresholds
GET
Insightsthresholdsretrieve — insightsthresholdsretrieve
/v1/api/projects/{project-id}/insights/{insight-id}/thresholds/{id}

MCP Tools

drf-viewset-mixin-that-gates

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
drf-viewset-mixin-that-gates-2

DRF ViewSet mixin that gates coalesced responses behind permission checks.

drf-viewset-mixin-that-gates-3

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
bulk-update-tags-multiple-objects

Bulk update tags on multiple objects.

drf-viewset-mixin-that-gates-4

DRF ViewSet mixin that gates coalesced responses behind permission checks.

generate-ai-suggested-name-and

Generate an AI-suggested name and description for an insight based on its query configuration.

read-only
returns-basic-details-about-last

Returns basic details about the last 5 insights viewed by this user. Most recently viewed first.

read-only idempotent
returns-trending-insights-based-view

Returns trending insights based on view count in the last N days (default 7).

read-only idempotent
update-insight-view-timestamps

Update insight view timestamps.

drf-viewset-mixin-that-gates-5

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
drf-viewset-mixin-that-gates-6

DRF ViewSet mixin that gates coalesced responses behind permission checks.

idempotent
drf-viewset-mixin-that-gates-7

DRF ViewSet mixin that gates coalesced responses behind permission checks.

idempotent
hard-delete-this-model-is

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

idempotent
drf-viewset-mixin-that-gates-8

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
drf-viewset-mixin-that-gates-9

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
drf-viewset-mixin-that-gates-10

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
drf-viewset-mixin-that-gates-11

DRF ViewSet mixin that gates coalesced responses behind permission checks.

environmentsinsightssharinglist

environmentsinsightssharinglist

read-only idempotent
create-new-password-sharing-configuration

Create a new password for the sharing configuration.

delete-password-sharing-configuration

Delete a password from the sharing configuration.

idempotent
environmentsinsightssharingrefreshcreate

environmentsinsightssharingrefreshcreate

environmentsinsightsthresholdslist

environmentsinsightsthresholdslist

read-only idempotent
environmentsinsightsthresholdsretrieve

environmentsinsightsthresholdsretrieve

read-only idempotent
drf-viewset-mixin-that-gates-12

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
drf-viewset-mixin-that-gates-13

DRF ViewSet mixin that gates coalesced responses behind permission checks.

drf-viewset-mixin-that-gates-14

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
bulk-update-tags-multiple-objects-2

Bulk update tags on multiple objects.

drf-viewset-mixin-that-gates-15

DRF ViewSet mixin that gates coalesced responses behind permission checks.

generate-ai-suggested-name-and-2

Generate an AI-suggested name and description for an insight based on its query configuration.

read-only
returns-basic-details-about-last-2

Returns basic details about the last 5 insights viewed by this user. Most recently viewed first.

read-only idempotent
returns-trending-insights-based-view-2

Returns trending insights based on view count in the last N days (default 7).

read-only idempotent
update-insight-view-timestamps-2

Update insight view timestamps.

drf-viewset-mixin-that-gates-16

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
drf-viewset-mixin-that-gates-17

DRF ViewSet mixin that gates coalesced responses behind permission checks.

idempotent
drf-viewset-mixin-that-gates-18

DRF ViewSet mixin that gates coalesced responses behind permission checks.

idempotent
hard-delete-this-model-is-2

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

idempotent
drf-viewset-mixin-that-gates-19

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
drf-viewset-mixin-that-gates-20

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
drf-viewset-mixin-that-gates-21

DRF ViewSet mixin that gates coalesced responses behind permission checks.

read-only idempotent
drf-viewset-mixin-that-gates-22

DRF ViewSet mixin that gates coalesced responses behind permission checks.

insightssharinglist

insightssharinglist

read-only idempotent
create-new-password-sharing-configuration-2

Create a new password for the sharing configuration.

delete-password-sharing-configuration-2

Delete a password from the sharing configuration.

idempotent
insightssharingrefreshcreate

insightssharingrefreshcreate

insightsthresholdslist

insightsthresholdslist

read-only idempotent
insightsthresholdsretrieve

insightsthresholdsretrieve

read-only idempotent

Capability Spec

posthog-insights.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: PostHog API — insights
  description: 'PostHog API — insights. 46 operations. Lead operation: insights. Self-contained Naftiko capability covering
    one Posthog business surface.'
  tags:
  - Posthog
  - insights
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    POSTHOG_API_KEY: POSTHOG_API_KEY
capability:
  consumes:
  - type: http
    namespace: posthog-insights
    baseUri: ''
    description: PostHog API — insights business capability. Self-contained, no shared references.
    resources:
    - name: api-environments-environment_id-insights
      path: /api/environments/{environment_id}/insights/
      operations:
      - name: environmentsinsightslist
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: basic
          in: query
          type: boolean
          description: Return basic insight metadata only (no results, faster).
        - name: created_by
          in: query
          type: string
          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
          in: query
          type: string
          description: Filter by `created_at > created_date_from`. Accepts absolute or relative dates.
        - name: created_date_to
          in: query
          type: string
          description: Filter by `created_at < created_date_to`. Accepts absolute or relative dates.
        - name: dashboards
          in: query
          type: string
          description: JSON-encoded array of dashboard IDs. Returns insights attached to every listed dashboard (AND).
        - name: date_from
          in: query
          type: string
          description: Filter by `last_modified_at > date_from`. Accepts absolute dates (`2025-04-23`) or relative strings
            (`-7d`, `-1m`).
        - name: date_to
          in: query
          type: string
          description: Filter by `last_modified_at < date_to`. Accepts absolute dates or relative strings.
        - name: favorited
          in: query
          type: boolean
          description: Include this parameter (any value) to restrict results to insights marked as favorited.
        - name: format
          in: query
          type: string
        - name: insight
          in: query
          type: string
          description: Restrict to a single insight type. `JSON` matches non-wrapper query insights; `SQL` matches HogQL queries.
        - name: last_viewed_date_from
          in: query
          type: string
          description: Filter by `last_viewed_at > last_viewed_date_from`. Accepts absolute or relative dates.
        - name: last_viewed_date_to
          in: query
          type: string
          description: Filter by `last_viewed_at < last_viewed_date_to`. Accepts absolute or relative dates.
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
        - name: refresh
          in: query
          type: string
          description: 'Whether to refresh the retrieved insights, how aggressively, and if sync or async:'
        - name: saved
          in: query
          type: boolean
          description: When truthy, restricts results to insights that are saved (or attached to a visible dashboard). When
            falsy, only unsaved insights.
        - name: search
          in: query
          type: string
          description: Case-insensitive substring match across name, derived_name, description, and tag names.
        - name: short_id
          in: query
          type: string
        - name: tags
          in: query
          type: string
          description: JSON-encoded array of tag names. Returns insights with any of the listed tags.
        - name: user
          in: query
          type: boolean
          description: Include this parameter (any value) to restrict results to insights created by the authenticated user.
      - name: environmentsinsightscreate
        method: POST
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-environments-environment_id-insights-activity
      path: /api/environments/{environment_id}/insights/activity/
      operations:
      - name: environmentsinsightsallactivityretrieve
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
    - name: api-environments-environment_id-insights-bulk_update_tags
      path: /api/environments/{environment_id}/insights/bulk_update_tags/
      operations:
      - name: environmentsinsightsbulkupdatetagscreate
        method: POST
        description: Bulk update tags on multiple objects.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-environments-environment_id-insights-cancel
      path: /api/environments/{environment_id}/insights/cancel/
      operations:
      - name: environmentsinsightscancelcreate
        method: POST
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-environments-environment_id-insights-generate_metadata
      path: /api/environments/{environment_id}/insights/generate_metadata/
      operations:
      - name: environmentsinsightsgeneratemetadatacreate
        method: POST
        description: Generate an AI-suggested name and description for an insight based on its query configuration.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-environments-environment_id-insights-my_last_viewed
      path: /api/environments/{environment_id}/insights/my_last_viewed/
      operations:
      - name: environmentsinsightsmylastviewedretrieve
        method: GET
        description: Returns basic details about the last 5 insights viewed by this user. Most recently viewed first.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
    - name: api-environments-environment_id-insights-trending
      path: /api/environments/{environment_id}/insights/trending/
      operations:
      - name: environmentsinsightstrendingretrieve
        method: GET
        description: Returns trending insights based on view count in the last N days (default 7).
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
    - name: api-environments-environment_id-insights-viewed
      path: /api/environments/{environment_id}/insights/viewed/
      operations:
      - name: environmentsinsightsviewedcreate
        method: POST
        description: Update insight view timestamps.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-environments-environment_id-insights-id
      path: /api/environments/{environment_id}/insights/{id}/
      operations:
      - name: environmentsinsightsretrieve
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: from_dashboard
          in: query
          type: integer
          description: 'Only if loading an insight in the context of a dashboard: The relevant dashboard''s ID.'
        - name: id
          in: path
          type: string
          description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
          required: true
        - name: refresh
          in: query
          type: string
          description: 'Whether to refresh the insight, how aggresively, and if sync or async:'
      - name: environmentsinsightsupdate
        method: PUT
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: string
          description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: environmentsinsightspartialupdate
        method: PATCH
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: string
          description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: environmentsinsightsdestroy
        method: DELETE
        description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: string
          description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
          required: true
    - name: api-environments-environment_id-insights-id-activity
      path: /api/environments/{environment_id}/insights/{id}/activity/
      operations:
      - name: environmentsinsightsactivityretrieve
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this insight.
          required: true
    - name: api-environments-environment_id-insights-id-analyze
      path: /api/environments/{environment_id}/insights/{id}/analyze/
      operations:
      - name: environmentsinsightsanalyzeretrieve
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this insight.
          required: true
    - name: api-environments-environment_id-insights-id-suggestions
      path: /api/environments/{environment_id}/insights/{id}/suggestions/
      operations:
      - name: environmentsinsightssuggestionsretrieve
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this insight.
          required: true
      - name: environmentsinsightssuggestionscreate
        method: POST
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this insight.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-environments-environment_id-insights-insight_id-sharing
      path: /api/environments/{environment_id}/insights/{insight_id}/sharing/
      operations:
      - name: environmentsinsightssharinglist
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: insight_id
          in: path
          type: integer
          required: true
    - name: api-environments-environment_id-insights-insight_id-sharing-passwords
      path: /api/environments/{environment_id}/insights/{insight_id}/sharing/passwords/
      operations:
      - name: environmentsinsightssharingpasswordscreate
        method: POST
        description: Create a new password for the sharing configuration.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: insight_id
          in: path
          type: integer
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-environments-environment_id-insights-insight_id-sharing-passwords-password_i
      path: /api/environments/{environment_id}/insights/{insight_id}/sharing/passwords/{password_id}/
      operations:
      - name: environmentsinsightssharingpasswordsdestroy
        method: DELETE
        description: Delete a password from the sharing configuration.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: insight_id
          in: path
          type: integer
          required: true
        - name: password_id
          in: path
          type: string
          required: true
    - name: api-environments-environment_id-insights-insight_id-sharing-refresh
      path: /api/environments/{environment_id}/insights/{insight_id}/sharing/refresh/
      operations:
      - name: environmentsinsightssharingrefreshcreate
        method: POST
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: insight_id
          in: path
          type: integer
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-environments-environment_id-insights-insight_id-thresholds
      path: /api/environments/{environment_id}/insights/{insight_id}/thresholds/
      operations:
      - name: environmentsinsightsthresholdslist
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: insight_id
          in: path
          type: integer
          required: true
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
    - name: api-environments-environment_id-insights-insight_id-thresholds-id
      path: /api/environments/{environment_id}/insights/{insight_id}/thresholds/{id}/
      operations:
      - name: environmentsinsightsthresholdsretrieve
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this threshold.
          required: true
        - name: insight_id
          in: path
          type: integer
          required: true
    - name: api-projects-project_id-insights
      path: /api/projects/{project_id}/insights/
      operations:
      - name: insightslist
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: basic
          in: query
          type: boolean
          description: Return basic insight metadata only (no results, faster).
        - name: created_by
          in: query
          type: string
          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
          in: query
          type: string
          description: Filter by `created_at > created_date_from`. Accepts absolute or relative dates.
        - name: created_date_to
          in: query
          type: string
          description: Filter by `created_at < created_date_to`. Accepts absolute or relative dates.
        - name: dashboards
          in: query
          type: string
          description: JSON-encoded array of dashboard IDs. Returns insights attached to every listed dashboard (AND).
        - name: date_from
          in: query
          type: string
          description: Filter by `last_modified_at > date_from`. Accepts absolute dates (`2025-04-23`) or relative strings
            (`-7d`, `-1m`).
        - name: date_to
          in: query
          type: string
          description: Filter by `last_modified_at < date_to`. Accepts absolute dates or relative strings.
        - name: favorited
          in: query
          type: boolean
          description: Include this parameter (any value) to restrict results to insights marked as favorited.
        - name: format
          in: query
          type: string
        - name: insight
          in: query
          type: string
          description: Restrict to a single insight type. `JSON` matches non-wrapper query insights; `SQL` matches HogQL queries.
        - name: last_viewed_date_from
          in: query
          type: string
          description: Filter by `last_viewed_at > last_viewed_date_from`. Accepts absolute or relative dates.
        - name: last_viewed_date_to
          in: query
          type: string
          description: Filter by `last_viewed_at < last_viewed_date_to`. Accepts absolute or relative dates.
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
        - name: refresh
          in: query
          type: string
          description: 'Whether to refresh the retrieved insights, how aggressively, and if sync or async:'
        - name: saved
          in: query
          type: boolean
          description: When truthy, restricts results to insights that are saved (or attached to a visible dashboard). When
            falsy, only unsaved insights.
        - name: search
          in: query
          type: string
          description: Case-insensitive substring match across name, derived_name, description, and tag names.
        - name: short_id
          in: query
          type: string
        - name: tags
          in: query
          type: string
          description: JSON-encoded array of tag names. Returns insights with any of the listed tags.
        - name: user
          in: query
          type: boolean
          description: Include this parameter (any value) to restrict results to insights created by the authenticated user.
      - name: insightscreate
        method: POST
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-insights-activity
      path: /api/projects/{project_id}/insights/activity/
      operations:
      - name: insightsallactivityretrieve
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
    - name: api-projects-project_id-insights-bulk_update_tags
      path: /api/projects/{project_id}/insights/bulk_update_tags/
      operations:
      - name: insightsbulkupdatetagscreate
        method: POST
        description: Bulk update tags on multiple objects.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-insights-cancel
      path: /api/projects/{project_id}/insights/cancel/
      operations:
      - name: insightscancelcreate
        method: POST
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-insights-generate_metadata
      path: /api/projects/{project_id}/insights/generate_metadata/
      operations:
      - name: insightsgeneratemetadatacreate
        method: POST
        description: Generate an AI-suggested name and description for an insight based on its query configuration.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-insights-my_last_viewed
      path: /api/projects/{project_id}/insights/my_last_viewed/
      operations:
      - name: insightsmylastviewedretrieve
        method: GET
        description: Returns basic details about the last 5 insights viewed by this user. Most recently viewed first.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
    - name: api-projects-project_id-insights-trending
      path: /api/projects/{project_id}/insights/trending/
      operations:
      - name: insightstrendingretrieve
        method: GET
        description: Returns trending insights based on view count in the last N days (default 7).
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
    - name: api-projects-project_id-insights-viewed
      path: /api/projects/{project_id}/insights/viewed/
      operations:
      - name: insightsviewedcreate
        method: POST
        description: Update insight view timestamps.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-insights-id
      path: /api/projects/{project_id}/insights/{id}/
      operations:
      - name: insightsretrieve
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: from_dashboard
          in: query
          type: integer
          description: 'Only if loading an insight in the context of a dashboard: The relevant dashboard''s ID.'
        - name: id
          in: path
          type: string
          description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
          required: true
        - name: refresh
          in: query
          type: string
          description: 'Whether to refresh the insight, how aggresively, and if sync or async:'
      - name: insightsupdate
        method: PUT
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: string
          description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: insightspartialupdate
        method: PATCH
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: string
          description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: insightsdestroy
        method: DELETE
        description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: string
          description: Numeric primary key or 8-character `short_id` (for example `AaVQ8Ijw`) identifying the insight.
          required: true
    - name: api-projects-project_id-insights-id-activity
      path: /api/projects/{project_id}/insights/{id}/activity/
      operations:
      - name: insightsactivityretrieve
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this insight.
          required: true
    - name: api-projects-project_id-insights-id-analyze
      path: /api/projects/{project_id}/insights/{id}/analyze/
      operations:
      - name: insightsanalyzeretrieve
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this insight.
          required: true
    - name: api-projects-project_id-insights-id-suggestions
      path: /api/projects/{project_id}/insights/{id}/suggestions/
      operations:
      - name: insightssuggestionsretrieve
        method: GET
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this insight.
          required: true
      - name: insightssuggestionscreate
        method: POST
        description: DRF ViewSet mixin that gates coalesced responses behind permission checks.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: format
          in: query
          type: string
        - name: id
          in: path
          type: integer
          descripti

# --- truncated at 32 KB (82 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/posthog/refs/heads/main/capabilities/posthog-insights.yaml