PostHog · Capability

PostHog API — customer_analytics

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

Run with Naftiko Posthogcustomer_analytics

What You Can Do

GET
Groupstypesmetricslist — groupstypesmetricslist
/v1/api/projects/{project-id}/groups-types/{group-type-index}/metrics
POST
Groupstypesmetricscreate — groupstypesmetricscreate
/v1/api/projects/{project-id}/groups-types/{group-type-index}/metrics
GET
Groupstypesmetricsretrieve — groupstypesmetricsretrieve
/v1/api/projects/{project-id}/groups-types/{group-type-index}/metrics/{id}
PUT
Groupstypesmetricsupdate — groupstypesmetricsupdate
/v1/api/projects/{project-id}/groups-types/{group-type-index}/metrics/{id}
PATCH
Groupstypesmetricspartialupdate — groupstypesmetricspartialupdate
/v1/api/projects/{project-id}/groups-types/{group-type-index}/metrics/{id}
DELETE
Groupstypesmetricsdestroy — groupstypesmetricsdestroy
/v1/api/projects/{project-id}/groups-types/{group-type-index}/metrics/{id}

MCP Tools

groupstypesmetricslist

groupstypesmetricslist

read-only idempotent
groupstypesmetricscreate

groupstypesmetricscreate

groupstypesmetricsretrieve

groupstypesmetricsretrieve

read-only idempotent
groupstypesmetricsupdate

groupstypesmetricsupdate

idempotent
groupstypesmetricspartialupdate

groupstypesmetricspartialupdate

idempotent
groupstypesmetricsdestroy

groupstypesmetricsdestroy

idempotent

Capability Spec

posthog-customer-analytics.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: PostHog API — customer_analytics
  description: 'PostHog API — customer_analytics. 6 operations. Lead operation: customer_analytics. Self-contained Naftiko
    capability covering one Posthog business surface.'
  tags:
  - Posthog
  - customer_analytics
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    POSTHOG_API_KEY: POSTHOG_API_KEY
capability:
  consumes:
  - type: http
    namespace: posthog-customer-analytics
    baseUri: ''
    description: PostHog API — customer_analytics business capability. Self-contained, no shared references.
    resources:
    - name: api-projects-project_id-groups_types-group_type_index-metrics
      path: /api/projects/{project_id}/groups_types/{group_type_index}/metrics/
      operations:
      - name: groupstypesmetricslist
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: group_type_index
          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: groupstypesmetricscreate
        method: POST
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: group_type_index
          in: path
          type: integer
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-groups_types-group_type_index-metrics-id
      path: /api/projects/{project_id}/groups_types/{group_type_index}/metrics/{id}/
      operations:
      - name: groupstypesmetricsretrieve
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: group_type_index
          in: path
          type: integer
          required: true
        - name: id
          in: path
          type: string
          description: A UUID string identifying this group usage metric.
          required: true
      - name: groupstypesmetricsupdate
        method: PUT
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: group_type_index
          in: path
          type: integer
          required: true
        - name: id
          in: path
          type: string
          description: A UUID string identifying this group usage metric.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: groupstypesmetricspartialupdate
        method: PATCH
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: group_type_index
          in: path
          type: integer
          required: true
        - name: id
          in: path
          type: string
          description: A UUID string identifying this group usage metric.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: groupstypesmetricsdestroy
        method: DELETE
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: group_type_index
          in: path
          type: integer
          required: true
        - name: id
          in: path
          type: string
          description: A UUID string identifying this group usage metric.
          required: true
    authentication:
      type: bearer
      token: '{{env.POSTHOG_API_KEY}}'
  exposes:
  - type: rest
    namespace: posthog-customer-analytics-rest
    port: 8080
    description: REST adapter for PostHog API — customer_analytics. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/projects/{project-id}/groups-types/{group-type-index}/metrics
      name: api-projects-project-id-groups-types-group-type-index-metrics
      description: REST surface for api-projects-project_id-groups_types-group_type_index-metrics.
      operations:
      - method: GET
        name: groupstypesmetricslist
        description: groupstypesmetricslist
        call: posthog-customer-analytics.groupstypesmetricslist
        with:
          group_type_index: rest.group_type_index
          limit: rest.limit
          offset: rest.offset
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: groupstypesmetricscreate
        description: groupstypesmetricscreate
        call: posthog-customer-analytics.groupstypesmetricscreate
        with:
          group_type_index: rest.group_type_index
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/projects/{project-id}/groups-types/{group-type-index}/metrics/{id}
      name: api-projects-project-id-groups-types-group-type-index-metrics-id
      description: REST surface for api-projects-project_id-groups_types-group_type_index-metrics-id.
      operations:
      - method: GET
        name: groupstypesmetricsretrieve
        description: groupstypesmetricsretrieve
        call: posthog-customer-analytics.groupstypesmetricsretrieve
        with:
          group_type_index: rest.group_type_index
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: groupstypesmetricsupdate
        description: groupstypesmetricsupdate
        call: posthog-customer-analytics.groupstypesmetricsupdate
        with:
          group_type_index: rest.group_type_index
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: groupstypesmetricspartialupdate
        description: groupstypesmetricspartialupdate
        call: posthog-customer-analytics.groupstypesmetricspartialupdate
        with:
          group_type_index: rest.group_type_index
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: groupstypesmetricsdestroy
        description: groupstypesmetricsdestroy
        call: posthog-customer-analytics.groupstypesmetricsdestroy
        with:
          group_type_index: rest.group_type_index
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: posthog-customer-analytics-mcp
    port: 9090
    transport: http
    description: MCP adapter for PostHog API — customer_analytics. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: groupstypesmetricslist
      description: groupstypesmetricslist
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: posthog-customer-analytics.groupstypesmetricslist
      with:
        group_type_index: tools.group_type_index
        limit: tools.limit
        offset: tools.offset
      outputParameters:
      - type: object
        mapping: $.
    - name: groupstypesmetricscreate
      description: groupstypesmetricscreate
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: posthog-customer-analytics.groupstypesmetricscreate
      with:
        group_type_index: tools.group_type_index
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: groupstypesmetricsretrieve
      description: groupstypesmetricsretrieve
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: posthog-customer-analytics.groupstypesmetricsretrieve
      with:
        group_type_index: tools.group_type_index
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: groupstypesmetricsupdate
      description: groupstypesmetricsupdate
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: posthog-customer-analytics.groupstypesmetricsupdate
      with:
        group_type_index: tools.group_type_index
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: groupstypesmetricspartialupdate
      description: groupstypesmetricspartialupdate
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: posthog-customer-analytics.groupstypesmetricspartialupdate
      with:
        group_type_index: tools.group_type_index
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: groupstypesmetricsdestroy
      description: groupstypesmetricsdestroy
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: posthog-customer-analytics.groupstypesmetricsdestroy
      with:
        group_type_index: tools.group_type_index
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.