> ## 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.

# Get session

> Gets an Agent Vault session.



## OpenAPI

````yaml GET /api/v1/agent-vault/sessions/{sessionId}
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}:
    get:
      tags:
        - Agent Vault Sessions
      description: Gets an Agent Vault session.
      operationId: getAgentVaultSession
      parameters:
        - 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:
                  session:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: The ID of the session.
                      actor:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - user
                                description: >-
                                  Whether the session belongs to a user or a
                                  machine identity.
                              id:
                                type: string
                                format: uuid
                                nullable: true
                                description: >-
                                  The ID of the user or machine identity the
                                  session belongs to, or null if it was deleted.
                              username:
                                type: string
                                description: >-
                                  The username of the user. Once the user is
                                  deleted, the email recorded when the session
                                  was created.
                              email:
                                type: string
                                nullable: true
                                description: >-
                                  The email address of the user. Once the user
                                  is deleted, the email recorded when the
                                  session was created.
                              firstName:
                                type: string
                                nullable: true
                                description: >-
                                  The first name of the user. Once the user is
                                  deleted, the full name recorded when the
                                  session was created.
                              lastName:
                                type: string
                                nullable: true
                                description: >-
                                  The last name of the user, or null once the
                                  user is deleted.
                            required:
                              - type
                              - id
                              - username
                              - email
                              - firstName
                              - lastName
                            additionalProperties: false
                            title: User
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - machineIdentity
                                description: >-
                                  Whether the session belongs to a user or a
                                  machine identity.
                              id:
                                type: string
                                format: uuid
                                nullable: true
                                description: >-
                                  The ID of the user or machine identity the
                                  session belongs to, or null if it was deleted.
                              name:
                                type: string
                                description: >-
                                  The name of the machine identity. Once the
                                  machine identity is deleted, the name recorded
                                  when the session was created.
                            required:
                              - type
                              - id
                              - name
                            additionalProperties: false
                            title: Machine identity
                      status:
                        type: string
                        enum:
                          - active
                          - revoked
                          - expired
                      expiresAt:
                        type: string
                        format: date-time
                        nullable: true
                        description: When the session expires, or null when it never does.
                      revokedAt:
                        type: string
                        format: date-time
                        nullable: true
                      createdAt:
                        type: string
                        format: date-time
                      accessBundles:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              nullable: true
                            name:
                              type: string
                            position:
                              type: number
                          required:
                            - id
                            - name
                            - position
                          additionalProperties: false
                    required:
                      - id
                      - actor
                      - status
                      - expiresAt
                      - revokedAt
                      - createdAt
                      - accessBundles
                    additionalProperties: false
                required:
                  - session
                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.