> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-docs-prisma-airs-updates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get logs by log id



## OpenAPI

````yaml https://raw.githubusercontent.com/PaloAltoNetworks/openapi/refs/heads/main/openapi.yaml get /logs/{logId}
openapi: 3.0.0
info:
  title: Prisma AIRS AI Gateway API
  version: 3.0.0
  description: ''
servers:
  - url: https://aigw.portkey.ai/v1
    description: Managed
  - url: https://self-hosted-gateway-url.example.com/v1
    description: Self-hosted -- replace with your own gateway host
security:
  - Authorization: []
tags:
  - name: Assistants
    description: ''
  - name: Audio
    description: ''
  - name: Batch
    description: ''
  - name: Chat
    description: ''
  - name: Completions
    description: ''
  - name: Embeddings
    description: ''
  - name: Files
    description: ''
  - name: Fine-Tuning
    description: ''
  - name: Images
    description: ''
  - name: Model Pricing
    description: ''
  - name: Models
    description: ''
  - name: Moderations
    description: ''
  - name: OCR
    description: ''
  - name: Realtime
    description: ''
  - name: Rerank
    description: ''
  - name: Responses
    description: ''
  - name: Vector Stores
    description: ''
  - name: Configs
    description: ''
  - name: Guardrails
    description: ''
  - name: Integrations
    description: ''
  - name: Integrations > Models
    description: ''
  - name: Integrations > Workspaces
    description: ''
  - name: Providers
    description: ''
  - name: Secret References
    description: ''
  - name: MCP Integrations
    description: ''
  - name: MCP Integrations > Capabilities
    description: ''
  - name: MCP Integrations > Metadata
    description: ''
  - name: MCP Integrations > Workspaces
    description: ''
  - name: MCP Servers
    description: ''
  - name: MCP Servers > Capabilities
    description: ''
  - name: MCP Servers > Connections
    description: ''
  - name: MCP Servers > User Access
    description: ''
  - name: API Keys
    description: ''
  - name: Deployments
    description: ''
  - name: Org Guardrails
    description: ''
  - name: Rate Limit Policies
    description: ''
  - name: Usage Limit Policies
    description: ''
  - name: Analytics > Graphs
    description: ''
  - name: Analytics > Groups
    description: ''
  - name: Analytics > Summary
    description: ''
  - name: Feedback
    description: ''
  - name: Logs
    description: ''
paths:
  /logs/{logId}:
    get:
      tags:
        - Logs
      parameters:
        - name: logId
          in: path
          required: true
          schema:
            type: string
        - name: path_format
          in: query
          required: false
          schema:
            type: string
            enum:
              - v1
              - v2
            default: v1
        - name: created_at
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - hooks
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogObject'
components:
  schemas:
    LogObject:
      type: object
      required:
        - _id
        - request
        - response
        - organisation_id
        - created_at
      properties:
        _id:
          type: string
          format: uuid
          nullable: true
        request:
          $ref: '#/components/schemas/LogRequest'
        response:
          $ref: '#/components/schemas/LogResponse'
        organisation_id:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
        metrics:
          $ref: '#/components/schemas/AnalyticsMetrics'
        finalUntransformedRequest:
          $ref: '#/components/schemas/RequestResponseObject'
        originalResponse:
          $ref: '#/components/schemas/RequestResponseObject'
        transformedRequest:
          $ref: '#/components/schemas/RequestResponseObject'
    LogRequest:
      type: object
      required:
        - url
        - method
        - portkeyHeaders
      properties:
        url:
          type: string
          format: uri
        method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - DELETE
            - PATCH
            - OPTIONS
            - HEAD
        headers:
          type: object
          additionalProperties:
            type: string
        body:
          type: object
          additionalProperties: true
        portkeyHeaders:
          type: object
          additionalProperties:
            type: string
    LogResponse:
      type: object
      required:
        - status
        - responseTime
        - lastUsedOptionJsonPath
      properties:
        status:
          type: integer
          format: int32
        headers:
          type: object
          additionalProperties:
            type: string
        body:
          type: object
          additionalProperties: true
        responseTime:
          type: integer
          format: int64
        lastUsedOptionJsonPath:
          type: string
    AnalyticsMetrics:
      type: object
      properties:
        id:
          type: string
          format: uuid
        organisation_id:
          type: string
        organisation_name:
          type: string
        prompt_id:
          type: string
        prompt_version_id:
          type: string
        config_id:
          type: string
        created_at:
          type: string
          format: date-time
        is_success:
          type: boolean
        ai_org:
          type: string
        ai_model:
          type: string
        req_units:
          type: number
          format: float
        res_units:
          type: number
          format: float
        total_units:
          type: number
          format: float
        cost:
          type: number
          format: float
        cost_currency:
          type: string
          default: USD
        request_url:
          type: string
          format: uri
        request_method:
          type: string
        response_status_code:
          type: integer
          format: int32
        response_time:
          type: integer
          format: int64
        is_proxy_call:
          type: boolean
        cache_status:
          type: string
          nullable: true
        cache_type:
          type: string
          nullable: true
        stream_mode:
          type: integer
          nullable: true
        retry_success_count:
          type: integer
        trace_id:
          type: string
        span_id:
          type: string
        span_name:
          type: string
        parent_span_id:
          type: string
        mode:
          type: string
        virtual_key:
          type: string
        source:
          type: string
        runtime:
          type: string
        runtime_version:
          type: string
        sdk_version:
          type: string
        config:
          type: string
        internal_trace_id:
          type: string
        last_used_option_index:
          type: integer
        config_version_id:
          type: string
        prompt_slug:
          type: string
        workspace_slug:
          type: string
          nullable: true
        log_store_file_path_format:
          type: string
        metadata.key:
          type: array
          items:
            type: string
            nullable: true
        metadata.value:
          type: array
          items:
            type: string
            nullable: true
        api_key_id:
          type: string
        request_parsing_time:
          type: integer
          format: int64
        pre_processing_time:
          type: integer
          format: int64
        cache_processing_time:
          type: integer
          format: int64
        response_parsing_time:
          type: integer
          format: int64
        gateway_processing_time:
          type: integer
          format: int64
        upstream_response_time:
          type: integer
          format: int64
    RequestResponseObject:
      type: object
      properties:
        body:
          type: object
          additionalProperties: true
        headers:
          type: object
          additionalProperties:
            type: string
        url:
          type: string
          format: uri
        method:
          type: string
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````