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

# Tail session logs

> Lists chunks added since your last call. Call it every few seconds with the previous `nextCursor`. Any call can return a chunk you already have, so skip any whose `chunkId` and `proxyId` you've read. The chunks decrypt the same way as the ones from [the endpoint that lists session logs](/api-reference/endpoints/agent-vault-session-logs/list). If Infisical can't read session logs, the request fails with the error `AgentVaultSessionLogStorageUnavailable`.



## OpenAPI

````yaml GET /api/v1/agent-vault/sessions/{sessionId}/logs/tail
openapi: 3.0.3
info:
  title: Infisical API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
  - url: https://us.infisical.com
    description: Production server (US)
  - url: https://eu.infisical.com
    description: Production server (EU)
  - url: http://localhost:8080
    description: Local server
security: []
paths:
  /api/v1/agent-vault/sessions/{sessionId}/logs/tail:
    get:
      tags:
        - Agent Vault Session Logs
      description: >-
        Lists chunks added since your last call. Call it every few seconds with
        the previous `nextCursor`. Any call can return a chunk you already have,
        so skip any whose `chunkId` and `proxyId` you've read. The chunks
        decrypt the same way as the ones from [the endpoint that lists session
        logs](/api-reference/endpoints/agent-vault-session-logs/list). If
        Infisical can't read session logs, the request fails with the error
        `AgentVaultSessionLogStorageUnavailable`.
      operationId: tailAgentVaultSessionLogs
      parameters:
        - schema:
            type: string
            maxLength: 8192
          in: query
          name: cursor
          required: false
          description: >-
            The `nextCursor` from your last call. Leave it out on the first call
            to start from the most recent chunks.
        - schema:
            type: string
            format: uuid
          in: path
          name: sessionId
          required: true
          description: The ID of the session.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  sessionLogs:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                        description: Whether session logs are on.
                      isRecordable:
                        type: boolean
                        description: False if this session's requests can't be recorded.
                      sessionKey:
                        type: string
                        nullable: true
                        description: >-
                          The key that decrypts every chunk in this response, as
                          base64. Null if the response has no chunks.
                      disabledReason:
                        type: string
                        enum:
                          - 'off'
                          - not-on-plan
                        nullable: true
                        description: >-
                          Why no logs are returned: `off` when session logs are
                          off, `not-on-plan` when the plan doesn't include the
                          storage they use. Null when logs are returned.
                      storageType:
                        type: string
                        enum:
                          - default
                          - external
                        nullable: true
                        description: >-
                          Where this session's logs are read from: `default` or
                          `external`. Null when session logs are off.
                    required:
                      - enabled
                      - isRecordable
                      - sessionKey
                      - disabledReason
                      - storageType
                    additionalProperties: false
                    description: >-
                      Whether session logs are on, whether this session can be
                      recorded, and the key that decrypts the chunks.
                  chunks:
                    type: array
                    items:
                      type: object
                      properties:
                        chunkId:
                          type: string
                          description: The ID of the chunk.
                        proxyId:
                          type: string
                          description: The ID of the proxy that uploaded the chunk.
                        ciphertextBytes:
                          type: number
                          description: The size of the encrypted chunk in bytes.
                        presignedGetUrl:
                          type: string
                          description: The URL to download the chunk from.
                      required:
                        - chunkId
                        - proxyId
                        - ciphertextBytes
                        - presignedGetUrl
                      additionalProperties: false
                  nextCursor:
                    type: string
                    description: >-
                      Pass this as `cursor` on your next call, a few seconds
                      later.
                required:
                  - sessionLogs
                  - chunks
                  - nextCursor
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 422
                  message: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.