PostHog logs API

The logs API from PostHog — 43 operation(s) for logs.

OpenAPI Specification

posthog-logs-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: PostHog actions logs API
  version: 1.0.0
  description: ''
tags:
- name: logs
paths:
  /api/environments/{environment_id}/logs/alerts/:
    get:
      operationId: environments_logs_alerts_list
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - 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
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedLogsAlertConfigurationList'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
    post:
      operationId: environments_logs_alerts_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsAlertConfiguration'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LogsAlertConfiguration'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LogsAlertConfiguration'
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsAlertConfiguration'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/alerts/{id}/:
    get:
      operationId: environments_logs_alerts_retrieve
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs alert configuration.
        required: true
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsAlertConfiguration'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
    put:
      operationId: environments_logs_alerts_update
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs alert configuration.
        required: true
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsAlertConfiguration'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LogsAlertConfiguration'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LogsAlertConfiguration'
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsAlertConfiguration'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
    patch:
      operationId: environments_logs_alerts_partial_update
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs alert configuration.
        required: true
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedLogsAlertConfiguration'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedLogsAlertConfiguration'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedLogsAlertConfiguration'
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsAlertConfiguration'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
    delete:
      operationId: environments_logs_alerts_destroy
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs alert configuration.
        required: true
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '204':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/alerts/{id}/destinations/:
    post:
      operationId: environments_logs_alerts_destinations_create
      description: Create a notification destination for this alert. One HogFunction is created per alert event kind (firing, resolved, ...) atomically.
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs alert configuration.
        required: true
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsAlertCreateDestination'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LogsAlertCreateDestination'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LogsAlertCreateDestination'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsAlertDestinationResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/alerts/{id}/destinations/delete/:
    post:
      operationId: environments_logs_alerts_destinations_delete_create
      description: Delete a notification destination by deleting its HogFunction group atomically.
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs alert configuration.
        required: true
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsAlertDeleteDestination'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LogsAlertDeleteDestination'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LogsAlertDeleteDestination'
        required: true
      responses:
        '204':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/alerts/{id}/events/:
    get:
      operationId: environments_logs_alerts_events_list
      description: Paginated event history for this alert, newest first. Returns state transitions, errored checks, and user-initiated control-plane rows (reset, enable/disable, snooze/unsnooze, threshold change) — quiet no-op check rows (where state didn't change and there was no error) are filtered out since only the last 10 are kept and they carry no forensic value. Optional `?kind=...` narrows to a single kind.
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs alert configuration.
        required: true
      - 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
      tags:
      - logs
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedLogsAlertEventList'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/alerts/{id}/reset/:
    post:
      operationId: environments_logs_alerts_reset_create
      description: Reset a broken alert. Clears the consecutive-failure counter and schedules an immediate recheck.
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs alert configuration.
        required: true
      tags:
      - logs
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsAlertConfiguration'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/alerts/simulate/:
    post:
      operationId: environments_logs_alerts_simulate_create
      description: Simulate a logs alert on historical data using the full state machine. Read-only — no alert check records are created.
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsAlertSimulateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LogsAlertSimulateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LogsAlertSimulateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsAlertSimulateResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/attributes/:
    get:
      operationId: environments_logs_attributes_retrieve
      parameters:
      - in: query
        name: attribute_type
        schema:
          enum:
          - log
          - resource
          type: string
          minLength: 1
        description: 'Type of attributes: "log" for log attributes, "resource" for resource attributes. Defaults to "log".


          * `log` - log

          * `resource` - resource'
      - in: query
        name: dateRange
        schema:
          $ref: '#/components/schemas/_DateRange'
        description: Date range to search within. Defaults to last hour.
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: filterGroup
        schema:
          type: array
          items:
            $ref: '#/components/schemas/_LogPropertyFilter'
          default: []
        description: Property filters to narrow which logs are scanned for attributes.
      - in: query
        name: limit
        schema:
          type: integer
          maximum: 100
          minimum: 1
        description: 'Max results (default: 100)'
      - in: query
        name: offset
        schema:
          type: integer
          minimum: 0
        description: 'Pagination offset (default: 0)'
      - in: query
        name: search
        schema:
          type: string
          minLength: 1
        description: Search filter for attribute names
      - in: query
        name: search_values
        schema:
          type: boolean
          default: false
        description: When true, the search query also matches attribute values (not just keys). Each result indicates whether it matched on key or value.
      - in: query
        name: serviceNames
        schema:
          type: array
          items:
            type: string
          default: []
        description: Filter attributes to those appearing in logs from these services.
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_LogsAttributesResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/count/:
    post:
      operationId: environments_logs_count_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/_LogsCountRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/_LogsCountRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/_LogsCountRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_LogsCountResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/count-ranges/:
    post:
      operationId: environments_logs_count_ranges_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/_LogsCountRangesRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/_LogsCountRangesRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/_LogsCountRangesRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_LogsCountRangesResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/export/:
    post:
      operationId: environments_logs_export_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/has_logs/:
    get:
      operationId: environments_logs_has_logs_retrieve
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/query/:
    post:
      operationId: environments_logs_query_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/_LogsQueryRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/_LogsQueryRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/_LogsQueryRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_LogsQueryResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/sampling_rules/:
    get:
      operationId: environments_logs_sampling_rules_list
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - 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
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedLogsSamplingRuleList'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
    post:
      operationId: environments_logs_sampling_rules_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsSamplingRule'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LogsSamplingRule'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LogsSamplingRule'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsSamplingRule'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/sampling_rules/{id}/:
    get:
      operationId: environments_logs_sampling_rules_retrieve
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs exclusion rule.
        required: true
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsSamplingRule'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
    put:
      operationId: environments_logs_sampling_rules_update
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs exclusion rule.
        required: true
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsSamplingRule'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LogsSamplingRule'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LogsSamplingRule'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsSamplingRule'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
    patch:
      operationId: environments_logs_sampling_rules_partial_update
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs exclusion rule.
        required: true
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedLogsSamplingRule'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedLogsSamplingRule'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedLogsSamplingRule'
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsSamplingRule'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
    delete:
      operationId: environments_logs_sampling_rules_destroy
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs exclusion rule.
        required: true
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '204':
          description: No response body
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/sampling_rules/{id}/simulate/:
    post:
      operationId: environments_logs_sampling_rules_simulate_create
      description: Dry-run estimate for how much volume this rule would remove (placeholder response until CH-backed simulation is wired).
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this logs exclusion rule.
        required: true
      tags:
      - logs
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsSamplingRuleSimulateResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/sampling_rules/reorder/:
    post:
      operationId: environments_logs_sampling_rules_reorder_create
      description: Atomically reassign priorities so the given ID order maps to ascending priorities (0..n-1).
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - 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
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsSamplingRuleReorder'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LogsSamplingRuleReorder'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LogsSamplingRuleReorder'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedLogsSamplingRuleList'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/services/:
    post:
      operationId: environments_logs_services_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/_LogsServicesRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/_LogsServicesRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/_LogsServicesRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_LogsServicesResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/sparkline/:
    post:
      operationId: environments_logs_sparkline_create
      parameters:
      - $ref: '#/components/parameters/EnvironmentIdPath'
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/_LogsSparklineRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/_LogsSparklineRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/_LogsSparklineRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_LogsSparklineResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{environment_id}/logs/values/:
    get:
      operationId: environments_logs_values_retrieve
      parameters:
      - in: query
        name: attribute_type
        schema:
          enum:
          - log
          - resource
          type: string
          minLength: 1
        description: 'Type of attribute: "log" or "resource". Defaults to "log".


          * `log` - log

          * `resource` - resource'
      - in: query
        name: dateRange
        schema:
          $ref: '#/components/schemas/_DateRange'
        description: Date range to search within. Defaults to last hour.
      - $ref: '#/components/parameters/EnvironmentIdPath'
      - in: query
        name: filterGroup
        schema:
          type: array
          items:
            $ref: '#/components/schemas/_LogPropertyFilter'
          default: []
        description: Property filters to narrow which logs are scanned for values.
      - in: query
        name: key
        schema:
          type: string
          minLength: 1
        description: The attribute key to get values for
        required: true
      - in: query
        name: serviceNames
        schema:
          type: array
          items:
            type: string
          default: []
        description: Filter values to those appearing in logs from these services.
      - in: query
        name: value
        schema:
          type: string
          minLength: 1
        description: Search filter for attribute values
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_LogsValuesResponse'
          description: ''
      deprecated: true
      x-explicit-tags:
      - logs
  /api/environments/{project_id}/logs/explainLogWithAI/:
    post:
      operationId: logs_explainLogWithAI_create
      description: 'Explain a log entry using AI.


        POST /api/environments/:id/logs/explainLogWithAI/'
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExplainRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ExplainRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ExplainRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExplainRequest'
          description: ''
      x-explicit-tags:
      - logs
  /api/environments/{project_id}/logs/views/:
    get:
      operationId: logs_views_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'
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedLogsViewList'
          description: ''
      x-explicit-tags:
      - logs
    post:
      operationId: logs_views_create
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsView'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LogsView'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LogsView'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsView'
          description: ''
      x-explicit-tags:
      - logs
  /api/environments/{project_id}/logs/views/{short_id}/:
    get:
      operationId: logs_views_retrieve
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: short_id
        schema:
          type: string
        required: true
      tags:
      - logs
      security:
      - PersonalAPIKeyAuth:
        - logs:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsView'
          description: ''
      x-explicit-tags:
      - logs
    put:
      operationId: logs_views_update
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: short_id
        schema:
          type: string
        required: true
      tags:
      - logs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsView'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/LogsView'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/LogsView'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - logs:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsView'
          description: ''
      x-explicit-tags:
      - logs
    patch:
      operationId: logs_views_partial_update
      parameters:
      - $ref: '#/components/parame

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