PostHog cdp API

The cdp API from PostHog — 23 operation(s) for cdp.

OpenAPI Specification

posthog-cdp-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: PostHog actions cdp API
  version: 1.0.0
  description: ''
tags:
- name: cdp
paths:
  /api/environments/{environment_id}/hog_functions/:
    get:
      operationId: environments_hog_functions_list
      parameters:
      - in: query
        name: created_at
        schema:
          type: string
          format: date-time
      - in: query
        name: created_by
        schema:
          type: integer
      - in: query
        name: enabled
        schema:
          type: boolean
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: id
        schema:
          type: string
          format: uuid
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: type
        schema:
          type: array
          items:
            type: string
        description: Multiple values may be separated by commas.
        explode: false
        style: form
      - in: query
        name: updated_at
        schema:
          type: string
          format: date-time
      tags:
      - cdp
      security:
      - PersonalAPIKeyAuth:
        - hog_function:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedHogFunctionMinimalList'
          description: ''
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
    post:
      operationId: environments_hog_functions_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HogFunction'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/HogFunction'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/HogFunction'
      security:
      - PersonalAPIKeyAuth:
        - hog_function:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunction'
          description: ''
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/environments/{environment_id}/hog_functions/{id}/:
    get:
      operationId: environments_hog_functions_retrieve
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      tags:
      - cdp
      security:
      - PersonalAPIKeyAuth:
        - hog_function:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunction'
          description: ''
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
    put:
      operationId: environments_hog_functions_update
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HogFunction'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/HogFunction'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/HogFunction'
      security:
      - PersonalAPIKeyAuth:
        - hog_function:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunction'
          description: ''
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
    patch:
      operationId: environments_hog_functions_partial_update
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedHogFunction'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedHogFunction'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedHogFunction'
      security:
      - PersonalAPIKeyAuth:
        - hog_function:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunction'
          description: ''
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
    delete:
      operationId: environments_hog_functions_destroy
      description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      tags:
      - cdp
      responses:
        '405':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/environments/{environment_id}/hog_functions/{id}/enable_backfills/:
    post:
      operationId: environments_hog_functions_enable_backfills_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HogFunction'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/HogFunction'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/HogFunction'
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/environments/{environment_id}/hog_functions/{id}/invocations/:
    post:
      operationId: environments_hog_functions_invocations_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HogFunctionInvocation'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/HogFunctionInvocation'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/HogFunctionInvocation'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - hog_function:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunctionInvocation'
          description: ''
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/environments/{environment_id}/hog_functions/{id}/logs/:
    get:
      operationId: environments_hog_functions_logs_retrieve
      parameters:
      - in: query
        name: after
        schema:
          type: string
          format: date-time
        description: Only return entries after this ISO 8601 timestamp.
      - in: query
        name: before
        schema:
          type: string
          format: date-time
        description: Only return entries before this ISO 8601 timestamp.
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - in: query
        name: instance_id
        schema:
          type: string
          minLength: 1
        description: Filter logs to a specific execution instance.
      - in: query
        name: level
        schema:
          type: string
          minLength: 1
        description: 'Comma-separated log levels to include, e.g. ''WARN,ERROR''. Valid levels: DEBUG, LOG, INFO, WARN, ERROR.'
      - in: query
        name: limit
        schema:
          type: integer
          maximum: 500
          minimum: 1
          default: 50
        description: Maximum number of log entries to return (1-500, default 50).
      - in: query
        name: search
        schema:
          type: string
          minLength: 1
        description: Case-insensitive substring search across log messages.
      tags:
      - cdp
      security:
      - PersonalAPIKeyAuth:
        - hog_function:read
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/environments/{environment_id}/hog_functions/{id}/metrics/:
    get:
      operationId: environments_hog_functions_metrics_retrieve
      parameters:
      - in: query
        name: after
        schema:
          type: string
          default: -7d
          minLength: 1
        description: Start of the time range. Accepts relative formats like '-7d', '-24h' or ISO 8601 timestamps. Defaults to '-7d'.
      - in: query
        name: before
        schema:
          type: string
          minLength: 1
        description: End of the time range. Same format as 'after'. Defaults to now.
      - in: query
        name: breakdown_by
        schema:
          enum:
          - name
          - kind
          type: string
          default: kind
          minLength: 1
        description: 'Group the series by metric ''name'' or ''kind''. Defaults to ''kind''.


          * `name` - name

          * `kind` - kind'
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - in: query
        name: instance_id
        schema:
          type: string
          minLength: 1
        description: Filter metrics to a specific execution instance.
      - in: query
        name: interval
        schema:
          enum:
          - hour
          - day
          - week
          type: string
          default: day
          minLength: 1
        description: 'Time bucket size for the series. One of: hour, day, week. Defaults to ''day''.


          * `hour` - hour

          * `day` - day

          * `week` - week'
      - in: query
        name: kind
        schema:
          type: string
          minLength: 1
        description: Comma-separated metric kinds to filter by, e.g. 'success,failure'.
      - in: query
        name: name
        schema:
          type: string
          minLength: 1
        description: Comma-separated metric names to filter by.
      tags:
      - cdp
      security:
      - PersonalAPIKeyAuth:
        - hog_function:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppMetricsResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/environments/{environment_id}/hog_functions/{id}/metrics/totals/:
    get:
      operationId: environments_hog_functions_metrics_totals_retrieve
      parameters:
      - in: query
        name: after
        schema:
          type: string
          default: -7d
          minLength: 1
        description: Start of the time range. Accepts relative formats like '-7d', '-24h' or ISO 8601 timestamps. Defaults to '-7d'.
      - in: query
        name: before
        schema:
          type: string
          minLength: 1
        description: End of the time range. Same format as 'after'. Defaults to now.
      - in: query
        name: breakdown_by
        schema:
          enum:
          - name
          - kind
          type: string
          default: kind
          minLength: 1
        description: 'Group the series by metric ''name'' or ''kind''. Defaults to ''kind''.


          * `name` - name

          * `kind` - kind'
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - in: query
        name: instance_id
        schema:
          type: string
          minLength: 1
        description: Filter metrics to a specific execution instance.
      - in: query
        name: interval
        schema:
          enum:
          - hour
          - day
          - week
          type: string
          default: day
          minLength: 1
        description: 'Time bucket size for the series. One of: hour, day, week. Defaults to ''day''.


          * `hour` - hour

          * `day` - day

          * `week` - week'
      - in: query
        name: kind
        schema:
          type: string
          minLength: 1
        description: Comma-separated metric kinds to filter by, e.g. 'success,failure'.
      - in: query
        name: name
        schema:
          type: string
          minLength: 1
        description: Comma-separated metric names to filter by.
      tags:
      - cdp
      security:
      - PersonalAPIKeyAuth:
        - hog_function:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppMetricsTotalsResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/environments/{environment_id}/hog_functions/icon/:
    get:
      operationId: environments_hog_functions_icon_retrieve
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - cdp
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/environments/{environment_id}/hog_functions/icons/:
    get:
      operationId: environments_hog_functions_icons_retrieve
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - cdp
      responses:
        '200':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/environments/{environment_id}/hog_functions/rearrange/:
    patch:
      operationId: environments_hog_functions_rearrange_partial_update
      description: Update the execution order of multiple HogFunctions.
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedHogFunctionRearrange'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedHogFunctionRearrange'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedHogFunctionRearrange'
      security:
      - PersonalAPIKeyAuth:
        - hog_function:write
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HogFunction'
          description: ''
      deprecated: true
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/projects/{project_id}/hog_function_templates/:
    get:
      operationId: hog_function_templates_list
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: query
        name: template_id
        schema:
          type: string
        description: Filter to a specific template by its template_id. Deprecated templates are excluded from list results; use the retrieve endpoint to look up a template by ID regardless of status.
      - in: query
        name: type
        schema:
          type: string
        description: Filter by template type (e.g. destination, email, sms_provider, broadcast). Defaults to destination if neither type nor types is provided.
      - in: query
        name: types
        schema:
          type: string
        description: Comma-separated list of template types to include (e.g. destination,email,sms_provider).
      tags:
      - cdp
      security:
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedHogFunctionTemplateList'
          description: ''
      x-explicit-tags:
      - hog_function_templates
      - cdp
  /api/projects/{project_id}/hog_function_templates/{template_id}/:
    get:
      operationId: hog_function_templates_retrieve
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: template_id
        schema:
          type: string
        required: true
      tags:
      - cdp
      security:
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunctionTemplate'
          description: ''
      x-explicit-tags:
      - hog_function_templates
      - cdp
  /api/projects/{project_id}/hog_functions/:
    get:
      operationId: hog_functions_list
      parameters:
      - in: query
        name: created_at
        schema:
          type: string
          format: date-time
      - in: query
        name: created_by
        schema:
          type: integer
      - in: query
        name: enabled
        schema:
          type: boolean
      - in: query
        name: id
        schema:
          type: string
          format: uuid
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - $ref: '#/components/parameters/ProjectIdPath'
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: type
        schema:
          type: array
          items:
            type: string
        description: Multiple values may be separated by commas.
        explode: false
        style: form
      - in: query
        name: updated_at
        schema:
          type: string
          format: date-time
      tags:
      - cdp
      security:
      - PersonalAPIKeyAuth:
        - hog_function:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedHogFunctionMinimalList'
          description: ''
      x-explicit-tags:
      - hog_functions
      - cdp
    post:
      operationId: hog_functions_create
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HogFunction'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/HogFunction'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/HogFunction'
      security:
      - PersonalAPIKeyAuth:
        - hog_function:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunction'
          description: ''
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/projects/{project_id}/hog_functions/{id}/:
    get:
      operationId: hog_functions_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - cdp
      security:
      - PersonalAPIKeyAuth:
        - hog_function:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunction'
          description: ''
      x-explicit-tags:
      - hog_functions
      - cdp
    put:
      operationId: hog_functions_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HogFunction'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/HogFunction'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/HogFunction'
      security:
      - PersonalAPIKeyAuth:
        - hog_function:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunction'
          description: ''
      x-explicit-tags:
      - hog_functions
      - cdp
    patch:
      operationId: hog_functions_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedHogFunction'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedHogFunction'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedHogFunction'
      security:
      - PersonalAPIKeyAuth:
        - hog_function:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunction'
          description: ''
      x-explicit-tags:
      - hog_functions
      - cdp
    delete:
      operationId: hog_functions_destroy
      description: Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - cdp
      responses:
        '405':
          description: No response body
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/projects/{project_id}/hog_functions/{id}/enable_backfills/:
    post:
      operationId: hog_functions_enable_backfills_create
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HogFunction'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/HogFunction'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/HogFunction'
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/projects/{project_id}/hog_functions/{id}/invocations/:
    post:
      operationId: hog_functions_invocations_create
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - cdp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HogFunctionInvocation'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/HogFunctionInvocation'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/HogFunctionInvocation'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - hog_function:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HogFunctionInvocation'
          description: ''
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/projects/{project_id}/hog_functions/{id}/logs/:
    get:
      operationId: hog_functions_logs_retrieve
      parameters:
      - in: query
        name: after
        schema:
          type: string
          format: date-time
        description: Only return entries after this ISO 8601 timestamp.
      - in: query
        name: before
        schema:
          type: string
          format: date-time
        description: Only return entries before this ISO 8601 timestamp.
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - in: query
        name: instance_id
        schema:
          type: string
          minLength: 1
        description: Filter logs to a specific execution instance.
      - in: query
        name: level
        schema:
          type: string
          minLength: 1
        description: 'Comma-separated log levels to include, e.g. ''WARN,ERROR''. Valid levels: DEBUG, LOG, INFO, WARN, ERROR.'
      - in: query
        name: limit
        schema:
          type: integer
          maximum: 500
          minimum: 1
          default: 50
        description: Maximum number of log entries to return (1-500, default 50).
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: query
        name: search
        schema:
          type: string
          minLength: 1
        description: Case-insensitive substring search across log messages.
      tags:
      - cdp
      security:
      - PersonalAPIKeyAuth:
        - hog_function:read
      responses:
        '200':
          description: No response body
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/projects/{project_id}/hog_functions/{id}/metrics/:
    get:
      operationId: hog_functions_metrics_retrieve
      parameters:
      - in: query
        name: after
        schema:
          type: string
          default: -7d
          minLength: 1
        description: Start of the time range. Accepts relative formats like '-7d', '-24h' or ISO 8601 timestamps. Defaults to '-7d'.
      - in: query
        name: before
        schema:
          type: string
          minLength: 1
        description: End of the time range. Same format as 'after'. Defaults to now.
      - in: query
        name: breakdown_by
        schema:
          enum:
          - name
          - kind
          type: string
          default: kind
          minLength: 1
        description: 'Group the series by metric ''name'' or ''kind''. Defaults to ''kind''.


          * `name` - name

          * `kind` - kind'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - in: query
        name: instance_id
        schema:
          type: string
          minLength: 1
        description: Filter metrics to a specific execution instance.
      - in: query
        name: interval
        schema:
          enum:
          - hour
          - day
          - week
          type: string
          default: day
          minLength: 1
        description: 'Time bucket size for the series. One of: hour, day, week. Defaults to ''day''.


          * `hour` - hour

          * `day` - day

          * `week` - week'
      - in: query
        name: kind
        schema:
          type: string
          minLength: 1
        description: Comma-separated metric kinds to filter by, e.g. 'success,failure'.
      - in: query
        name: name
        schema:
          type: string
          minLength: 1
        description: Comma-separated metric names to filter by.
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - cdp
      security:
      - PersonalAPIKeyAuth:
        - hog_function:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppMetricsResponse'
          description: ''
      x-explicit-tags:
      - hog_functions
      - cdp
  /api/projects/{project_id}/hog_functions/{id}/metrics/totals/:
    get:
      operationId: hog_functions_metrics_totals_retrieve
      parameters:
      - in: query
        name: after
        schema:
          type: string
          default: -7d
          minLength: 1
        description: Start of the time range. Accepts relative formats like '-7d', '-24h' or ISO 8601 timestamps. Defaults to '-7d'.
      - in: query
        name: before
        schema:
          type: string
          minLength: 1
        description: End of the time range. Same format as 'after'. Defaults to now.
      - in: query
        name: breakdown_by
        schema:
          enum:
          - name
          - kind
          type: string
          default: kind
          minLength: 1
        description: 'Group the series by metric ''name'' or ''kind''. Defaults to ''kind''.


          * `name` - name

          * `kind` - kind'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this hog function.
        required: true
      - in: query
        name: instance_id
        schema:
          type: string
          minLength: 1
        description: Filter metrics to a specific execution instance.
      - in: query
        name: interval
        schema:
          enum:
          - hour
          - day
          - week
          type: string
          default: day
          minLength: 1
        description: 'Time bucket size for the series. One of: hour, day, week. Defaults to ''day''.


          * `hou

# --- truncated at 32 KB (61 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/posthog/refs/heads/main/openapi/posthog-cdp-api-openapi.yml