PostHog · Capability

PostHog API — endpoints

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

Run with Naftiko Posthogendpoints

What You Can Do

GET
Environmentsendpointslist — List all endpoints for the team.
/v1/api/environments/{environment-id}/endpoints
GET
Environmentsendpointslist — List all endpoints for the team.
/v1/api/environments/{environment-id}/endpoints
POST
Environmentsendpointscreate — Create a new endpoint.
/v1/api/environments/{environment-id}/endpoints
POST
Environmentsendpointscreate — Create a new endpoint.
/v1/api/environments/{environment-id}/endpoints
POST
Environmentsendpointslastexecutiontimescreate — Get the last execution times in the past 6 months for multiple endpoints.
/v1/api/environments/{environment-id}/endpoints/last-execution-times
POST
Environmentsendpointslastexecutiontimescreate — Get the last execution times in the past 6 months for multiple endpoints.
/v1/api/environments/{environment-id}/endpoints/last-execution-times
GET
Environmentsendpointsretrieve — Retrieve an endpoint, or a specific version via ?version=N.
/v1/api/environments/{environment-id}/endpoints/{name}
GET
Environmentsendpointsretrieve — Retrieve an endpoint, or a specific version via ?version=N.
/v1/api/environments/{environment-id}/endpoints/{name}
PUT
Environmentsendpointsupdate — Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param to target a specific version.
/v1/api/environments/{environment-id}/endpoints/{name}
PUT
Environmentsendpointsupdate — Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param to target a specific version.
/v1/api/environments/{environment-id}/endpoints/{name}
PATCH
Environmentsendpointspartialupdate — Update an existing endpoint.
/v1/api/environments/{environment-id}/endpoints/{name}
PATCH
Environmentsendpointspartialupdate — Update an existing endpoint.
/v1/api/environments/{environment-id}/endpoints/{name}
DELETE
Environmentsendpointsdestroy — Delete an endpoint and clean up materialized query.
/v1/api/environments/{environment-id}/endpoints/{name}
DELETE
Environmentsendpointsdestroy — Delete an endpoint and clean up materialized query.
/v1/api/environments/{environment-id}/endpoints/{name}
POST
Environmentsendpointsmaterializationpreviewcreate — Preview the materialization transform for an endpoint. Shows what the query will look like after materialization, including range pair detection and bucket functions.
/v1/api/environments/{environment-id}/endpoints/{name}/materialization-preview
POST
Environmentsendpointsmaterializationpreviewcreate — Preview the materialization transform for an endpoint. Shows what the query will look like after materialization, including range pair detection and bucket functions.
/v1/api/environments/{environment-id}/endpoints/{name}/materialization-preview
GET
Environmentsendpointsmaterializationstatusretrieve — Get materialization status for an endpoint. Supports ?version=N query param.
/v1/api/environments/{environment-id}/endpoints/{name}/materialization-status
GET
Environmentsendpointsmaterializationstatusretrieve — Get materialization status for an endpoint. Supports ?version=N query param.
/v1/api/environments/{environment-id}/endpoints/{name}/materialization-status
GET
Environmentsendpointsopenapijsonretrieve — Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.
/v1/api/environments/{environment-id}/endpoints/{name}/openapi-json
GET
Environmentsendpointsopenapijsonretrieve — Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.
/v1/api/environments/{environment-id}/endpoints/{name}/openapi-json
GET
Environmentsendpointsrunretrieve — Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
/v1/api/environments/{environment-id}/endpoints/{name}/run
GET
Environmentsendpointsrunretrieve — Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
/v1/api/environments/{environment-id}/endpoints/{name}/run
POST
Environmentsendpointsruncreate — Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
/v1/api/environments/{environment-id}/endpoints/{name}/run
POST
Environmentsendpointsruncreate — Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
/v1/api/environments/{environment-id}/endpoints/{name}/run
GET
Environmentsendpointsversionslist — List all versions for an endpoint.
/v1/api/environments/{environment-id}/endpoints/{name}/versions
GET
Environmentsendpointsversionslist — List all versions for an endpoint.
/v1/api/environments/{environment-id}/endpoints/{name}/versions
GET
Endpointslist — List all endpoints for the team.
/v1/api/projects/{project-id}/endpoints
GET
Endpointslist — List all endpoints for the team.
/v1/api/projects/{project-id}/endpoints
POST
Endpointscreate — Create a new endpoint.
/v1/api/projects/{project-id}/endpoints
POST
Endpointscreate — Create a new endpoint.
/v1/api/projects/{project-id}/endpoints
POST
Endpointslastexecutiontimescreate — Get the last execution times in the past 6 months for multiple endpoints.
/v1/api/projects/{project-id}/endpoints/last-execution-times
POST
Endpointslastexecutiontimescreate — Get the last execution times in the past 6 months for multiple endpoints.
/v1/api/projects/{project-id}/endpoints/last-execution-times
GET
Endpointsretrieve — Retrieve an endpoint, or a specific version via ?version=N.
/v1/api/projects/{project-id}/endpoints/{name}
GET
Endpointsretrieve — Retrieve an endpoint, or a specific version via ?version=N.
/v1/api/projects/{project-id}/endpoints/{name}
PUT
Endpointsupdate — Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param to target a specific version.
/v1/api/projects/{project-id}/endpoints/{name}
PUT
Endpointsupdate — Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param to target a specific version.
/v1/api/projects/{project-id}/endpoints/{name}
PATCH
Endpointspartialupdate — Update an existing endpoint.
/v1/api/projects/{project-id}/endpoints/{name}
PATCH
Endpointspartialupdate — Update an existing endpoint.
/v1/api/projects/{project-id}/endpoints/{name}
DELETE
Endpointsdestroy — Delete an endpoint and clean up materialized query.
/v1/api/projects/{project-id}/endpoints/{name}
DELETE
Endpointsdestroy — Delete an endpoint and clean up materialized query.
/v1/api/projects/{project-id}/endpoints/{name}
POST
Endpointsmaterializationpreviewcreate — Preview the materialization transform for an endpoint. Shows what the query will look like after materialization, including range pair detection and bucket functions.
/v1/api/projects/{project-id}/endpoints/{name}/materialization-preview
POST
Endpointsmaterializationpreviewcreate — Preview the materialization transform for an endpoint. Shows what the query will look like after materialization, including range pair detection and bucket functions.
/v1/api/projects/{project-id}/endpoints/{name}/materialization-preview
GET
Endpointsmaterializationstatusretrieve — Get materialization status for an endpoint. Supports ?version=N query param.
/v1/api/projects/{project-id}/endpoints/{name}/materialization-status
GET
Endpointsmaterializationstatusretrieve — Get materialization status for an endpoint. Supports ?version=N query param.
/v1/api/projects/{project-id}/endpoints/{name}/materialization-status
GET
Endpointsopenapijsonretrieve — Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.
/v1/api/projects/{project-id}/endpoints/{name}/openapi-json
GET
Endpointsopenapijsonretrieve — Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.
/v1/api/projects/{project-id}/endpoints/{name}/openapi-json
GET
Endpointsrunretrieve — Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
/v1/api/projects/{project-id}/endpoints/{name}/run
GET
Endpointsrunretrieve — Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
/v1/api/projects/{project-id}/endpoints/{name}/run
POST
Endpointsruncreate — Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
/v1/api/projects/{project-id}/endpoints/{name}/run
POST
Endpointsruncreate — Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
/v1/api/projects/{project-id}/endpoints/{name}/run
GET
Endpointsversionslist — List all versions for an endpoint.
/v1/api/projects/{project-id}/endpoints/{name}/versions
GET
Endpointsversionslist — List all versions for an endpoint.
/v1/api/projects/{project-id}/endpoints/{name}/versions

MCP Tools

list-all-endpoints-team

List all endpoints for the team.

read-only idempotent
list-all-endpoints-team-2

List all endpoints for the team.

read-only idempotent
create-new-endpoint

Create a new endpoint.

create-new-endpoint-2

Create a new endpoint.

get-last-execution-times-past

Get the last execution times in the past 6 months for multiple endpoints.

read-only
get-last-execution-times-past-2

Get the last execution times in the past 6 months for multiple endpoints.

read-only
retrieve-endpoint-specific-version-version-n

Retrieve an endpoint, or a specific version via ?version=N.

read-only idempotent
retrieve-endpoint-specific-version-version-n-2

Retrieve an endpoint, or a specific version via ?version=N.

read-only idempotent
update-existing-endpoint-parameters-are

Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param to target a specific version.

idempotent
update-existing-endpoint-parameters-are-2

Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param to target a specific version.

idempotent
update-existing-endpoint

Update an existing endpoint.

idempotent
update-existing-endpoint-2

Update an existing endpoint.

idempotent
delete-endpoint-and-clean-up

Delete an endpoint and clean up materialized query.

idempotent
delete-endpoint-and-clean-up-2

Delete an endpoint and clean up materialized query.

idempotent
preview-materialization-transform-endpoint-shows

Preview the materialization transform for an endpoint. Shows what the query will look like after materialization, including range pair detection and bucket functions.

read-only
preview-materialization-transform-endpoint-shows-2

Preview the materialization transform for an endpoint. Shows what the query will look like after materialization, including range pair detection and bucket functions.

read-only
get-materialization-status-endpoint-supports

Get materialization status for an endpoint. Supports ?version=N query param.

read-only idempotent
get-materialization-status-endpoint-supports-2

Get materialization status for an endpoint. Supports ?version=N query param.

read-only idempotent
get-openapi-3-0-specification-this

Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.

read-only idempotent
get-openapi-3-0-specification-this-2

Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.

read-only idempotent
execute-endpoint-optional-materialization-supports

Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

read-only idempotent
execute-endpoint-optional-materialization-supports-2

Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

read-only idempotent
execute-endpoint-optional-materialization-supports-3

Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

read-only
execute-endpoint-optional-materialization-supports-4

Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

read-only
list-all-versions-endpoint

List all versions for an endpoint.

read-only idempotent
list-all-versions-endpoint-2

List all versions for an endpoint.

read-only idempotent
list-all-endpoints-team-3

List all endpoints for the team.

read-only idempotent
list-all-endpoints-team-4

List all endpoints for the team.

read-only idempotent
create-new-endpoint-3

Create a new endpoint.

create-new-endpoint-4

Create a new endpoint.

get-last-execution-times-past-3

Get the last execution times in the past 6 months for multiple endpoints.

read-only
get-last-execution-times-past-4

Get the last execution times in the past 6 months for multiple endpoints.

read-only
retrieve-endpoint-specific-version-version-n-3

Retrieve an endpoint, or a specific version via ?version=N.

read-only idempotent
retrieve-endpoint-specific-version-version-n-4

Retrieve an endpoint, or a specific version via ?version=N.

read-only idempotent
update-existing-endpoint-parameters-are-3

Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param to target a specific version.

idempotent
update-existing-endpoint-parameters-are-4

Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param to target a specific version.

idempotent
update-existing-endpoint-3

Update an existing endpoint.

idempotent
update-existing-endpoint-4

Update an existing endpoint.

idempotent
delete-endpoint-and-clean-up-3

Delete an endpoint and clean up materialized query.

idempotent
delete-endpoint-and-clean-up-4

Delete an endpoint and clean up materialized query.

idempotent
preview-materialization-transform-endpoint-shows-3

Preview the materialization transform for an endpoint. Shows what the query will look like after materialization, including range pair detection and bucket functions.

read-only
preview-materialization-transform-endpoint-shows-4

Preview the materialization transform for an endpoint. Shows what the query will look like after materialization, including range pair detection and bucket functions.

read-only
get-materialization-status-endpoint-supports-3

Get materialization status for an endpoint. Supports ?version=N query param.

read-only idempotent
get-materialization-status-endpoint-supports-4

Get materialization status for an endpoint. Supports ?version=N query param.

read-only idempotent
get-openapi-3-0-specification-this-3

Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.

read-only idempotent
get-openapi-3-0-specification-this-4

Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.

read-only idempotent
execute-endpoint-optional-materialization-supports-5

Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

read-only idempotent
execute-endpoint-optional-materialization-supports-6

Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

read-only idempotent
execute-endpoint-optional-materialization-supports-7

Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

read-only
execute-endpoint-optional-materialization-supports-8

Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

read-only
list-all-versions-endpoint-3

List all versions for an endpoint.

read-only idempotent
list-all-versions-endpoint-4

List all versions for an endpoint.

read-only idempotent

Capability Spec

posthog-endpoints.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: PostHog API — endpoints
  description: 'PostHog API — endpoints. 52 operations. Lead operation: endpoints. Self-contained Naftiko capability covering
    one Posthog business surface.'
  tags:
  - Posthog
  - endpoints
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    POSTHOG_API_KEY: POSTHOG_API_KEY
capability:
  consumes:
  - type: http
    namespace: posthog-endpoints
    baseUri: ''
    description: PostHog API — endpoints business capability. Self-contained, no shared references.
    resources:
    - name: api-environments-environment_id-endpoints
      path: /api/environments/{environment_id}/endpoints/
      operations:
      - name: environmentsendpointslist
        method: GET
        description: List all endpoints for the team.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created_by
          in: query
          type: integer
        - name: is_active
          in: query
          type: boolean
        - 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: environmentsendpointslist
        method: GET
        description: List all endpoints for the team.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created_by
          in: query
          type: integer
        - name: is_active
          in: query
          type: boolean
        - 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: environmentsendpointscreate
        method: POST
        description: Create a new endpoint.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: environmentsendpointscreate
        method: POST
        description: Create a new endpoint.
        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-endpoints-last_execution_times
      path: /api/environments/{environment_id}/endpoints/last_execution_times/
      operations:
      - name: environmentsendpointslastexecutiontimescreate
        method: POST
        description: Get the last execution times in the past 6 months for multiple endpoints.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: environmentsendpointslastexecutiontimescreate
        method: POST
        description: Get the last execution times in the past 6 months for multiple endpoints.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-environments-environment_id-endpoints-name
      path: /api/environments/{environment_id}/endpoints/{name}/
      operations:
      - name: environmentsendpointsretrieve
        method: GET
        description: Retrieve an endpoint, or a specific version via ?version=N.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: environmentsendpointsretrieve
        method: GET
        description: Retrieve an endpoint, or a specific version via ?version=N.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: environmentsendpointsupdate
        method: PUT
        description: Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param
          to target a specific version.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: environmentsendpointsupdate
        method: PUT
        description: Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param
          to target a specific version.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: environmentsendpointspartialupdate
        method: PATCH
        description: Update an existing endpoint.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: environmentsendpointspartialupdate
        method: PATCH
        description: Update an existing endpoint.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: environmentsendpointsdestroy
        method: DELETE
        description: Delete an endpoint and clean up materialized query.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: environmentsendpointsdestroy
        method: DELETE
        description: Delete an endpoint and clean up materialized query.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
    - name: api-environments-environment_id-endpoints-name-materialization_preview
      path: /api/environments/{environment_id}/endpoints/{name}/materialization_preview/
      operations:
      - name: environmentsendpointsmaterializationpreviewcreate
        method: POST
        description: Preview the materialization transform for an endpoint. Shows what the query will look like after materialization,
          including range pair detection and bucket functions.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: environmentsendpointsmaterializationpreviewcreate
        method: POST
        description: Preview the materialization transform for an endpoint. Shows what the query will look like after materialization,
          including range pair detection and bucket functions.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-environments-environment_id-endpoints-name-materialization_status
      path: /api/environments/{environment_id}/endpoints/{name}/materialization_status/
      operations:
      - name: environmentsendpointsmaterializationstatusretrieve
        method: GET
        description: Get materialization status for an endpoint. Supports ?version=N query param.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: environmentsendpointsmaterializationstatusretrieve
        method: GET
        description: Get materialization status for an endpoint. Supports ?version=N query param.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
    - name: api-environments-environment_id-endpoints-name-openapi.json
      path: /api/environments/{environment_id}/endpoints/{name}/openapi.json/
      operations:
      - name: environmentsendpointsopenapijsonretrieve
        method: GET
        description: Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: version
          in: query
          type: integer
          description: Specific endpoint version to generate the spec for. Defaults to latest.
      - name: environmentsendpointsopenapijsonretrieve
        method: GET
        description: Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: version
          in: query
          type: integer
          description: Specific endpoint version to generate the spec for. Defaults to latest.
    - name: api-environments-environment_id-endpoints-name-run
      path: /api/environments/{environment_id}/endpoints/{name}/run/
      operations:
      - name: environmentsendpointsrunretrieve
        method: GET
        description: Execute endpoint with optional materialization. Supports version parameter, runs latest version if not
          set.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: environmentsendpointsrunretrieve
        method: GET
        description: Execute endpoint with optional materialization. Supports version parameter, runs latest version if not
          set.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: environmentsendpointsruncreate
        method: POST
        description: Execute endpoint with optional materialization. Supports version parameter, runs latest version if not
          set.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: environmentsendpointsruncreate
        method: POST
        description: Execute endpoint with optional materialization. Supports version parameter, runs latest version if not
          set.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-environments-environment_id-endpoints-name-versions
      path: /api/environments/{environment_id}/endpoints/{name}/versions/
      operations:
      - name: environmentsendpointsversionslist
        method: GET
        description: List all versions for an endpoint.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created_by
          in: query
          type: integer
        - name: is_active
          in: query
          type: boolean
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: name
          in: path
          type: string
          required: true
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
      - name: environmentsendpointsversionslist
        method: GET
        description: List all versions for an endpoint.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created_by
          in: query
          type: integer
        - name: is_active
          in: query
          type: boolean
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: name
          in: path
          type: string
          required: true
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
    - name: api-projects-project_id-endpoints
      path: /api/projects/{project_id}/endpoints/
      operations:
      - name: endpointslist
        method: GET
        description: List all endpoints for the team.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created_by
          in: query
          type: integer
        - name: is_active
          in: query
          type: boolean
        - 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: endpointslist
        method: GET
        description: List all endpoints for the team.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created_by
          in: query
          type: integer
        - name: is_active
          in: query
          type: boolean
        - 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: endpointscreate
        method: POST
        description: Create a new endpoint.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: endpointscreate
        method: POST
        description: Create a new endpoint.
        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-endpoints-last_execution_times
      path: /api/projects/{project_id}/endpoints/last_execution_times/
      operations:
      - name: endpointslastexecutiontimescreate
        method: POST
        description: Get the last execution times in the past 6 months for multiple endpoints.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: endpointslastexecutiontimescreate
        method: POST
        description: Get the last execution times in the past 6 months for multiple endpoints.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-endpoints-name
      path: /api/projects/{project_id}/endpoints/{name}/
      operations:
      - name: endpointsretrieve
        method: GET
        description: Retrieve an endpoint, or a specific version via ?version=N.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: endpointsretrieve
        method: GET
        description: Retrieve an endpoint, or a specific version via ?version=N.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: endpointsupdate
        method: PUT
        description: Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param
          to target a specific version.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: endpointsupdate
        method: PUT
        description: Update an existing endpoint. Parameters are optional. Pass version in body or ?version=N query param
          to target a specific version.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: endpointspartialupdate
        method: PATCH
        description: Update an existing endpoint.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: endpointspartialupdate
        method: PATCH
        description: Update an existing endpoint.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: endpointsdestroy
        method: DELETE
        description: Delete an endpoint and clean up materialized query.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: endpointsdestroy
        method: DELETE
        description: Delete an endpoint and clean up materialized query.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
    - name: api-projects-project_id-endpoints-name-materialization_preview
      path: /api/projects/{project_id}/endpoints/{name}/materialization_preview/
      operations:
      - name: endpointsmaterializationpreviewcreate
        method: POST
        description: Preview the materialization transform for an endpoint. Shows what the query will look like after materialization,
          including range pair detection and bucket functions.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: endpointsmaterializationpreviewcreate
        method: POST
        description: Preview the materialization transform for an endpoint. Shows what the query will look like after materialization,
          including range pair detection and bucket functions.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-endpoints-name-materialization_status
      path: /api/projects/{project_id}/endpoints/{name}/materialization_status/
      operations:
      - name: endpointsmaterializationstatusretrieve
        method: GET
        description: Get materialization status for an endpoint. Supports ?version=N query param.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: endpointsmaterializationstatusretrieve
        method: GET
        description: Get materialization status for an endpoint. Supports ?version=N query param.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
    - name: api-projects-project_id-endpoints-name-openapi.json
      path: /api/projects/{project_id}/endpoints/{name}/openapi.json/
      operations:
      - name: endpointsopenapijsonretrieve
        method: GET
        description: Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: version
          in: query
          type: integer
          description: Specific endpoint version to generate the spec for. Defaults to latest.
      - name: endpointsopenapijsonretrieve
        method: GET
        description: Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: version
          in: query
          type: integer
          description: Specific endpoint version to generate the spec for. Defaults to latest.
    - name: api-projects-project_id-endpoints-name-run
      path: /api/projects/{project_id}/endpoints/{name}/run/
      operations:
      - name: endpointsrunretrieve
        method: GET
        description: Execute endpoint with optional materialization. Supports version parameter, runs latest version if not
          set.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: endpointsrunretrieve
        method: GET
        description: Execute endpoint with optional materialization. Supports version parameter, runs latest version if not
          set.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: endpointsruncreate
        method: POST
        description: Execute endpoint with optional materialization. Supports version parameter, runs latest version if not
          set.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: endpointsruncreate
        method: POST
        description: Execute endpoint with optional materialization. Supports version parameter, runs latest version if not
          set.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-endpoints-name-versions
      path: /api/projects/{project_id}/endpoints/{name}/versions/
      operations:
      - name: endpointsversionslist
        method: GET
        description: List all versions for an endpoint.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created_by
          in: query
          type: integer
        - name: is_active
          in: query
          type: boolean
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: name
          in: path
          type: string
          required: true
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
      - name: endpointsversionslist
        method: GET
        description: List all versions for an endpoint.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created_by
          in: query
          type: integer
        - name: is_active
          in: query
          type: boolean
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: name
          in: path
          type: string
          required: true
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
    authentication:
      type: bearer
      token: '{{env.POSTHOG_API_KEY}}'
  exposes:
  - type: rest
    namespace: posthog-endpoints-rest
    port: 8080
    description: REST adapter for PostHog API — endpoints. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/environments/{environment-id}/endpoints
      name: api-environments-environment-id-endpoints
      description: REST surface for api-environments-environment_id-endpoints.
      operations:
      - method: GET
        name: environmentsendpointslist
        description: List all endpoints for the team.
        call: posthog-endpoints.environmentsendpointslist
        with:
          created_by: rest.created_by
          is_active: rest.is_active
          limit: rest.limit
          offset: rest.offset
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: environmentsendpointslist
        description: List all endpoints for the team.
        call: posthog-endpoints.environmentsendpointslist
        with:
          created_by: rest.created_by
          is_active: rest.is_active
          limit: rest.limit
          offset: rest.offset
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: environmentsendpointscreate
        description: Create a new endpoint.
        call: posthog-endpoints.environmentsendpointscreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: environmentsendpointscreate
        description: Create a new endpoint.
        call: posthog-endpoints.environmentsendpointscreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/environments/{environment-id}/endpoints/last-execution-times
      name: api-environments-environment-id-endpoints-last-execution-times
      description: REST surface for api-environments-environment_id-endpoints-last_execution_times.
      operations:
      - method: POST
        name: environmentsendpointslastexecutiontimescreate
        description: Get the last execution times in the past 6 months for multiple endpoints.
        call: posthog-endpoints.environmentsendpointslastexecutiontimescreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: environmentsendpointslastexecutiontimescreate
        description: Get the last execution times in the past 6 months for multiple endpoints.
        call: posthog-endpoints.environmentsendpointslastexecutiontimescreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/environmen

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