naftiko: 1.0.0-alpha2 info: label: PostHog API — elements description: 'PostHog API — elements. 16 operations. Lead operation: elements. Self-contained Naftiko capability covering one Posthog business surface.' tags: - Posthog - elements created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: POSTHOG_API_KEY: POSTHOG_API_KEY capability: consumes: - type: http namespace: posthog-elements baseUri: '' description: PostHog API — elements business capability. Self-contained, no shared references. resources: - name: api-environments-environment_id-elements path: /api/environments/{environment_id}/elements/ operations: - name: environmentselementslist method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - 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: environmentselementscreate method: POST description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: api-environments-environment_id-elements-stats path: /api/environments/{environment_id}/elements/stats/ operations: - name: environmentselementsstatsretrieve method: GET description: The original version of this API always and only returned $autocapture elements outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-environments-environment_id-elements-values path: /api/environments/{environment_id}/elements/values/ operations: - name: environmentselementsvaluesretrieve method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-environments-environment_id-elements-id path: /api/environments/{environment_id}/elements/{id}/ operations: - name: environmentselementsretrieve method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this element. required: true - name: environmentselementsupdate method: PUT description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this element. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: environmentselementspartialupdate method: PATCH description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this element. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: environmentselementsdestroy method: DELETE description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this element. required: true - name: api-projects-project_id-elements path: /api/projects/{project_id}/elements/ operations: - name: elementslist method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - 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: elementscreate method: POST description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: api-projects-project_id-elements-stats path: /api/projects/{project_id}/elements/stats/ operations: - name: elementsstatsretrieve method: GET description: The original version of this API always and only returned $autocapture elements outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-projects-project_id-elements-values path: /api/projects/{project_id}/elements/values/ operations: - name: elementsvaluesretrieve method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-projects-project_id-elements-id path: /api/projects/{project_id}/elements/{id}/ operations: - name: elementsretrieve method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this element. required: true - name: elementsupdate method: PUT description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this element. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: elementspartialupdate method: PATCH description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this element. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: elementsdestroy method: DELETE description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: A unique integer value identifying this element. required: true authentication: type: bearer token: '{{env.POSTHOG_API_KEY}}' exposes: - type: rest namespace: posthog-elements-rest port: 8080 description: REST adapter for PostHog API — elements. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/environments/{environment-id}/elements name: api-environments-environment-id-elements description: REST surface for api-environments-environment_id-elements. operations: - method: GET name: environmentselementslist description: environmentselementslist call: posthog-elements.environmentselementslist with: limit: rest.limit offset: rest.offset outputParameters: - type: object mapping: $. - method: POST name: environmentselementscreate description: environmentselementscreate call: posthog-elements.environmentselementscreate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{environment-id}/elements/stats name: api-environments-environment-id-elements-stats description: REST surface for api-environments-environment_id-elements-stats. operations: - method: GET name: environmentselementsstatsretrieve description: The original version of this API always and only returned $autocapture elements call: posthog-elements.environmentselementsstatsretrieve outputParameters: - type: object mapping: $. - path: /v1/api/environments/{environment-id}/elements/values name: api-environments-environment-id-elements-values description: REST surface for api-environments-environment_id-elements-values. operations: - method: GET name: environmentselementsvaluesretrieve description: environmentselementsvaluesretrieve call: posthog-elements.environmentselementsvaluesretrieve outputParameters: - type: object mapping: $. - path: /v1/api/environments/{environment-id}/elements/{id} name: api-environments-environment-id-elements-id description: REST surface for api-environments-environment_id-elements-id. operations: - method: GET name: environmentselementsretrieve description: environmentselementsretrieve call: posthog-elements.environmentselementsretrieve with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: environmentselementsupdate description: environmentselementsupdate call: posthog-elements.environmentselementsupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: PATCH name: environmentselementspartialupdate description: environmentselementspartialupdate call: posthog-elements.environmentselementspartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: environmentselementsdestroy description: environmentselementsdestroy call: posthog-elements.environmentselementsdestroy with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/elements name: api-projects-project-id-elements description: REST surface for api-projects-project_id-elements. operations: - method: GET name: elementslist description: elementslist call: posthog-elements.elementslist with: limit: rest.limit offset: rest.offset outputParameters: - type: object mapping: $. - method: POST name: elementscreate description: elementscreate call: posthog-elements.elementscreate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/elements/stats name: api-projects-project-id-elements-stats description: REST surface for api-projects-project_id-elements-stats. operations: - method: GET name: elementsstatsretrieve description: The original version of this API always and only returned $autocapture elements call: posthog-elements.elementsstatsretrieve outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/elements/values name: api-projects-project-id-elements-values description: REST surface for api-projects-project_id-elements-values. operations: - method: GET name: elementsvaluesretrieve description: elementsvaluesretrieve call: posthog-elements.elementsvaluesretrieve outputParameters: - type: object mapping: $. - path: /v1/api/projects/{project-id}/elements/{id} name: api-projects-project-id-elements-id description: REST surface for api-projects-project_id-elements-id. operations: - method: GET name: elementsretrieve description: elementsretrieve call: posthog-elements.elementsretrieve with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: elementsupdate description: elementsupdate call: posthog-elements.elementsupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: PATCH name: elementspartialupdate description: elementspartialupdate call: posthog-elements.elementspartialupdate with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: elementsdestroy description: elementsdestroy call: posthog-elements.elementsdestroy with: id: rest.id outputParameters: - type: object mapping: $. - type: mcp namespace: posthog-elements-mcp port: 9090 transport: http description: MCP adapter for PostHog API — elements. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: environmentselementslist description: environmentselementslist hints: readOnly: true destructive: false idempotent: true call: posthog-elements.environmentselementslist with: limit: tools.limit offset: tools.offset outputParameters: - type: object mapping: $. - name: environmentselementscreate description: environmentselementscreate hints: readOnly: false destructive: false idempotent: false call: posthog-elements.environmentselementscreate with: body: tools.body outputParameters: - type: object mapping: $. - name: original-version-this-api-always description: The original version of this API always and only returned $autocapture elements hints: readOnly: true destructive: false idempotent: true call: posthog-elements.environmentselementsstatsretrieve outputParameters: - type: object mapping: $. - name: environmentselementsvaluesretrieve description: environmentselementsvaluesretrieve hints: readOnly: true destructive: false idempotent: true call: posthog-elements.environmentselementsvaluesretrieve outputParameters: - type: object mapping: $. - name: environmentselementsretrieve description: environmentselementsretrieve hints: readOnly: true destructive: false idempotent: true call: posthog-elements.environmentselementsretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: environmentselementsupdate description: environmentselementsupdate hints: readOnly: false destructive: false idempotent: true call: posthog-elements.environmentselementsupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: environmentselementspartialupdate description: environmentselementspartialupdate hints: readOnly: false destructive: false idempotent: true call: posthog-elements.environmentselementspartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: environmentselementsdestroy description: environmentselementsdestroy hints: readOnly: false destructive: true idempotent: true call: posthog-elements.environmentselementsdestroy with: id: tools.id outputParameters: - type: object mapping: $. - name: elementslist description: elementslist hints: readOnly: true destructive: false idempotent: true call: posthog-elements.elementslist with: limit: tools.limit offset: tools.offset outputParameters: - type: object mapping: $. - name: elementscreate description: elementscreate hints: readOnly: false destructive: false idempotent: false call: posthog-elements.elementscreate with: body: tools.body outputParameters: - type: object mapping: $. - name: original-version-this-api-always-2 description: The original version of this API always and only returned $autocapture elements hints: readOnly: true destructive: false idempotent: true call: posthog-elements.elementsstatsretrieve outputParameters: - type: object mapping: $. - name: elementsvaluesretrieve description: elementsvaluesretrieve hints: readOnly: true destructive: false idempotent: true call: posthog-elements.elementsvaluesretrieve outputParameters: - type: object mapping: $. - name: elementsretrieve description: elementsretrieve hints: readOnly: true destructive: false idempotent: true call: posthog-elements.elementsretrieve with: id: tools.id outputParameters: - type: object mapping: $. - name: elementsupdate description: elementsupdate hints: readOnly: false destructive: false idempotent: true call: posthog-elements.elementsupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: elementspartialupdate description: elementspartialupdate hints: readOnly: false destructive: false idempotent: true call: posthog-elements.elementspartialupdate with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: elementsdestroy description: elementsdestroy hints: readOnly: false destructive: true idempotent: true call: posthog-elements.elementsdestroy with: id: tools.id outputParameters: - type: object mapping: $.