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

# Get log by request ID



## OpenAPI

````yaml https://api.pdfshift.io/openapi.json get /logs/{request_id}
openapi: 3.0.3
info:
  title: PDFShift API Documentation
  version: '3.0'
  description: >-
    This is the documentation for the PDFShift API.


    Our aim here is to provide you with a clear, concise and complete set of
    tool to generate the PDF you want.


    Don't forget to add the `sandbox` parameter to `True` while testing the API,
    this won't use your credits and generate free PDF (with a watermark).

    But if you forgot to set it, don't worry ; Send us a message and we'll reset
    your credits usage.
  termsOfService: https://pdfshift.io/terms
  contact:
    name: PDFShift
    url: https://pdfshift.io
    email: support@pdfshift.io
  x-logo:
    url: https://pdfshift.io/images/favicons/android-chrome-512x512.png
servers:
  - url: https://api.pdfshift.io/v3
    description: ''
    x-last-modified: 1764750693905
security:
  - apiKeyHeader: []
externalDocs:
  description: You can access our documentation online by visiting https://docs.pdfshift.io
  url: https://docs.pdfshift.io
paths:
  /logs/{request_id}:
    get:
      tags: []
      summary: Get log by request ID
      parameters:
        - name: request_id
          in: path
          required: true
          description: The unique request ID of the log entry to retrieve.
          schema:
            type: string
      responses:
        '200':
          description: Returns a specific log entry by its request ID
          headers:
            X-RateLimit-Remaining:
              description: >-
                The number of requests remaining in the current rate limit
                window.
              schema:
                type: integer
            X-RateLimit-Limit:
              description: >-
                The maximum number of requests allowed in the current rate limit
                window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                The time at which the current rate limit window resets (Unix
                timestamp).
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Log'
              example:
                success: true
                log:
                  id: 12345500
                  duration: 2191
                  executed: 1764753251000
                  credits: 1
                  sandbox: false
                  filesize: 305345
                  error: null
                  code: 200
                  user_agent: Python/3.9 aiohttp/3.10.5
                  request_id: 40bad9f3-0eb8-4de3-82de-3886ff9522ed
                  query: null
          x-last-modified: 1764750969372
        '401':
          description: Unauthorized. Invalid auth key, missing, or disabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests. You have been rate limited.
          headers:
            X-RateLimit-Remaining:
              description: >-
                The number of requests remaining in the current rate limit
                window.
              schema:
                type: integer
            X-RateLimit-Limit:
              description: >-
                The maximum number of requests allowed in the current rate limit
                window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                The time at which the current rate limit window resets (Unix
                timestamp).
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Log:
      type: object
      properties:
        success:
          type: boolean
        log:
          $ref: '#/components/schemas/LogObject'
    Error:
      type: object
      properties:
        success:
          type: boolean
        error:
          type: string
        code:
          type: integer
          format: int32
    LogObject:
      type: object
      properties:
        id:
          type: integer
          format: int64
        duration:
          type: integer
          format: int32
        executed:
          type: integer
          format: int64
        credits:
          type: integer
          format: int32
        sandbox:
          type: boolean
        filesize:
          type: integer
          format: int32
        error:
          type: string
          default: null
        code:
          type: integer
          format: int32
        user_agent:
          type: string
          default: null
        request_id:
          type: string
        query:
          type: string
          default: null
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      description: >-
        Authenticate your account by including your secret key in API requests.

        You can manage your API keys in the
        [Dashboard](https://app.pdfshift.io/dashboard/).


        Authentication to the API is performed by using the HTTP Header
        X-API-Key.
      name: X-API-Key
      in: header
      x-last-modified: 1764750344730

````