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

# Get a logs



## OpenAPI

````yaml get /logs/{id}
openapi: 3.0.0
info:
  title: Customer API
  version: v1
servers:
  - url: https://sandbox-api.fedapay.com/v1
  - url: https://api.fedapay.com/v1
security: []
paths:
  /logs/{id}:
    get:
      summary: Get a logs
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
          description: Log ID.
      responses:
        '200':
          description: List of logs
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Log ID.
                    method:
                      type: string
                      description: HTTP method used for the request.
                    url:
                      type: string
                      description: URL of the request.
                    status:
                      type: integer
                      description: HTTP status code returned by the request.
                    ip_address:
                      type: string
                      description: IP address of the request.
                    version:
                      type: string
                      description: Version of the API used for the request.
                    source:
                      type: string
                      description: Source of the request.
                    query:
                      type: string
                      description: Query parameters of the request.
                    body:
                      type: string
                      description: Body of the request.
                    response:
                      type: string
                      description: Response body of the request.
                    account_id:
                      type: integer
                      description: ID of the log's account.
                    created_at:
                      type: string
                      format: date-time
                      description: Date and time of log creation.
                    updated_at:
                      type: string
                      format: date-time
                      description: Date and time of last log update.
        '401':
          description: Unauthorized. Provide a valid secret key.
        '404':
          description: Log not found.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          label: NodeJs
          source: >-
            const { FedaPay, Log } = require('fedapay');

            /* Replace YOUR_SECRETE_API_KEY with your real API key */

            FedaPay.setApiKey("YOUR_SECRETE_API_KEY");

            /* Specify whether you want to run your query in test or live mode
            */

            FedaPay.setEnvironment('sandbox'); //or setEnvironment('live');

            /* show a log */

            const log = await Log.retrieve( ID, params = {}, headers = {} );
        - lang: PHP
          source: |-
            \FedaPay\Fedapay::setApiKey(MY_API_KEY);
            /**
            * @var \FedaPay\FedaPayObject
            */
            $response = \FedaPay\Log::retrieve(ID);
            $logs = $response->logs;
            $meta = $response->meta;
        - lang: Ruby
          source: |-
            require 'fedapay';
            # configure FedaPay library
            FedaPay.api_key = '' # Your secret api key
            FedaPay.environment = '' # sandbox or live
            logs = FedaPay::Log.retrieve(ID);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````