> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apitally.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Request Logs

> Get request log data for an app. With pagination. Requests to endpoints that have been excluded in the dashboard are excluded here as well.



## OpenAPI

````yaml https://api.apitally.io/openapi.json get /v1/apps/{app_id}/request-logs
openapi: 3.1.0
info:
  title: Apitally API
  version: 1.0.0
servers:
  - url: https://api.apitally.io
security: []
paths:
  /v1/apps/{app_id}/request-logs:
    get:
      tags:
        - Request logs
      summary: Get Request Logs
      description: >-
        Get request log data for an app. With pagination. Requests to endpoints
        that have been excluded in the dashboard are excluded here as well.
      operationId: get_request_logs_v1_apps__app_id__request_logs_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
            description: App ID
            title: App Id
          description: App ID
        - name: app_env_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            description: Filter to environment ID, if provided.
            title: App Env Id
          description: Filter to environment ID, if provided.
        - name: consumer_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            description: Filter to consumer ID, if provided.
            title: Consumer Id
          description: Filter to consumer ID, if provided.
        - name: method
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 64
              - type: 'null'
            description: Filter to HTTP method(s), comma-separated.
            examples:
              - GET,POST
            title: Method
          description: Filter to HTTP method(s), comma-separated.
        - name: path
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 1024
              - type: 'null'
            description: Filter to path pattern, supports wildcards (*).
            examples:
              - /api/v1/*
            title: Path
          description: Filter to path pattern, supports wildcards (*).
        - name: status_code
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 128
                pattern: ^(?:\d{3}|\dxx)(?:,(?:\d{3}|\dxx))*$
              - type: 'null'
            description: >-
              Filter to HTTP status code(s), comma-separated. Can include code
              classes (e.g., '4xx').
            examples:
              - 2xx,400
            title: Status Code
          description: >-
            Filter to HTTP status code(s), comma-separated. Can include code
            classes (e.g., '4xx').
        - name: start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Start date and time in ISO 8601 format. Defaults to 24 hours ago.
            examples:
              - '2025-05-14T00:00:00Z'
            title: Start
          description: Start date and time in ISO 8601 format. Defaults to 24 hours ago.
        - name: end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: End date and time in ISO 8601 format. Defaults to now.
            examples:
              - '2025-05-15T00:00:00Z'
            title: End
          description: End date and time in ISO 8601 format. Defaults to now.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: Maximum number of records to return per page.
            default: 100
            title: Limit
          description: Maximum number of records to return per page.
        - name: next_token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 1024
              - type: 'null'
            description: >-
              Token to fetch the next page of records, as returned by a previous
              request.
            title: Next Token
          description: >-
            Token to fetch the next page of records, as returned by a previous
            request.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRequestLogsResponse'
        '404':
          description: App Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    GetRequestLogsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/RequestLogItem'
          type: array
          title: Data
          description: List of request log items.
        has_more:
          type: boolean
          title: Has More
          description: Whether there are more records to fetch.
        next_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Token
          description: Token to fetch the next page of records, if there are more.
      type: object
      required:
        - data
        - has_more
        - next_token
      title: GetRequestLogsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RequestLogItem:
      properties:
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: Timestamp of the request
        request_uuid:
          type: string
          format: uuid
          title: Request Uuid
          description: Unique identifier for the request
        env:
          type: string
          title: Env
          description: Environment
          examples:
            - prod
        consumer:
          anyOf:
            - type: string
            - type: 'null'
          title: Consumer
          description: Consumer identifier
          examples:
            - user-123
        method:
          type: string
          title: Method
          description: HTTP method
          examples:
            - GET
        path:
          anyOf:
            - type: string
            - type: 'null'
          title: Path
          description: Request path
          examples:
            - /v1/users/{user_id}
        url:
          type: string
          title: Url
          description: Request URL
          examples:
            - https://api.example.com/v1/users/1
        status_code:
          type: integer
          title: Status Code
          description: HTTP response status code
          examples:
            - 200
        request_size_bytes:
          type: integer
          title: Request Size Bytes
          description: Size of the request in bytes
        response_size_bytes:
          type: integer
          title: Response Size Bytes
          description: Size of the response in bytes
        response_time_ms:
          type: integer
          title: Response Time Ms
          description: Response time in milliseconds
        client_ip:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Ip
          description: Client IP address
          examples:
            - 203.45.123.67
        client_country_iso_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Country Iso Code
          description: ISO code of the client's country based on the IP address
          examples:
            - US
      type: object
      required:
        - timestamp
        - request_uuid
        - env
        - consumer
        - method
        - path
        - url
        - status_code
        - request_size_bytes
        - response_size_bytes
        - response_time_ms
        - client_ip
        - client_country_iso_code
      title: RequestLogItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Api-Key

````