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

# List files in image

> Returns files list



## OpenAPI

````yaml https://eu-north.nebius.computer/static/api.yaml get /inspect/{image_uuid}/list
openapi: 3.0.0
info:
  title: Contree API
  description: >
    Contree is a container management system combining virtual machine isolation
    with container operational efficiency. 

    Designed for security-sensitive workloads requiring hardware-enforced
    boundaries while maintaining

    container workflow compatibility.
  version: 1.0.0
servers:
  - url: '{baseUrl}/v1'
    description: |
      Nebius IAM-fronted endpoint (use `IAMBearerAuth` + `IAMProjectHeader`).
      Override `baseUrl` to point at a different deployment.
    variables:
      baseUrl:
        default: https://api.tokenfactory.nebius.com/sandboxes
        description: |
          Base URL of the contree service. Defaults to the public Nebius
          IAM-fronted endpoint; set to your self-hosted contree origin
          (e.g. `https://contree.example.com`) when running elsewhere.
security:
  - IAMBearerAuth: []
    IAMProjectHeader: []
tags:
  - name: images
    description: Operations related to container images
  - name: files
    description: Operations related to file uploads
  - name: instances
    description: Operations related to container instances
  - name: inspect
    description: Operations related to inspecting container images
  - name: operations
    description: Operations related to long-running operations
  - name: auth
    description: Authentication and token introspection
paths:
  /inspect/{image_uuid}/list:
    get:
      tags:
        - inspect
      summary: List files in image
      description: Returns files list
      operationId: inspectImageFile
      parameters:
        - name: image_uuid
          in: path
          required: true
          description: The UUID of the image to inspect
          schema:
            $ref: '#/components/schemas/UUIDSchema'
        - name: path
          in: query
          required: true
          allowReserved: true
          description: The path of the directory to inspect inside the image
          schema:
            type: string
            example: /etc
        - name: text
          in: query
          required: false
          allowEmptyValue: true
          schema:
            type: boolean
          description: >-
            If present (with or without value), returns text/plain format
            instead of JSON
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryList'
            text/plain:
              schema:
                type: string
                description: ls-like output format
                example: |
                  total 19.42 KB
                  drwxr-xr-x 1 0 0   858.00 May 30 12:13 bin
                  drwxr-xr-x 1 0 0        0 May 30 12:13 dev
                  drwxr-xr-x 1 0 0   540.00 May 30 12:13 etc
                  drwxr-xr-x 1 0 0        0 May 30 12:13 home
                  drwxr-xr-x 1 0 0   146.00 May 30 12:13 lib
                  drwxr-xr-x 1 0 0    28.00 May 30 12:13 media
                  drwxr-xr-x 1 0 0        0 May 30 12:13 mnt
                  drwxr-xr-x 1 0 0        0 May 30 12:13 opt
                  dr-xr-xr-x 1 0 0        0 May 30 12:13 proc
                  drwx------ 1 0 0        0 May 30 12:13 root
                  drwxr-xr-x 1 0 0     8.00 May 30 12:13 run
                  drwxr-xr-x 1 0 0   790.00 May 30 12:13 sbin
                  drwxr-xr-x 1 0 0        0 May 30 12:13 srv
                  drwxr-xr-x 1 0 0        0 May 30 12:13 sys
                  drwxrwxrwt 1 0 0        0 May 30 12:13 tmp
                  drwxr-xr-x 1 0 0    40.00 May 30 12:13 usr
                  drwxr-xr-x 1 0 0    86.00 May 30 12:13 var
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: >-
            Not Found - The file does not exist in the image or image does not
            exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Unprocessable Entity - The specified path could not be listed inside
            the image
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UUIDSchema:
      type: string
      format: uuid
      description: A UUID string
      example: 12345678-9abc-baba-deda-0123456789ab
    DirectoryList:
      type: object
      required:
        - path
        - files
      properties:
        path:
          type: string
          description: The directory path that was listed
          example: /etc
        files:
          type: array
          description: List of files and directories in the specified path
          items:
            $ref: '#/components/schemas/FileItem'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          oneOf:
            - type: string
            - type: object
            - type: array
              items:
                type: object
          description: Error message or structured validation errors
          example: Some error occurred, this is an example of error message
        status:
          type: integer
          description: HTTP status code
          example: 500
        traceback:
          type: array
          items:
            type: string
    FileItem:
      type: object
      required:
        - size
        - path
        - owner
        - group
        - mode
        - mtime
        - nlink
        - uid
        - gid
        - is_dir
        - is_regular
        - is_symlink
        - is_socket
        - is_fifo
        - symlink_to
      properties:
        size:
          type: integer
          format: int64
          description: File size in bytes
          example: 1024
        path:
          type: string
          description: File name (relative to the directory being listed)
          example: passwd
        owner:
          oneOf:
            - type: string
            - type: integer
          description: File owner name or UID
          example: root
        group:
          oneOf:
            - type: string
            - type: integer
          description: File group name or GID
          example: root
        uid:
          type: integer
          description: User ID of the file owner
          example: 0
        gid:
          type: integer
          description: Group ID of the file
          example: 0
        mode:
          type: integer
          description: File mode/permissions as integer (octal representation)
          example: 33188
        mtime:
          type: integer
          format: int64
          description: Last modification time as Unix timestamp
          example: 1640995200
        nlink:
          type: integer
          description: Number of hard links
          example: 1
        is_dir:
          type: boolean
          description: True if the item is a directory
          example: false
        is_regular:
          type: boolean
          description: True if the item is a regular file
          example: true
        is_symlink:
          type: boolean
          description: True if the item is a symbolic link
          example: false
        is_socket:
          type: boolean
          description: True if the item is a socket
          example: false
        is_fifo:
          type: boolean
          description: True if the item is a FIFO/named pipe
          example: false
        symlink_to:
          type: string
          description: Target path if the item is a symbolic link, empty string otherwise
          example: ''
  responses:
    BadRequest:
      description: Bad Request - Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: |
        Unauthorized - Invalid or missing authentication credentials.
        Either the `Authorization` bearer token is missing or invalid, or
        the `Project` header is missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden - Token does not have sufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    IAMBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: IAM
      description: |
        IAM bearer token issued by the Nebius IAM service. Sent as
        `Authorization: Bearer <iam-token>`. Must be combined with the
        `Project` header (see `IAMProjectHeader`).

        This is the recommended authentication scheme for new clients.
    IAMProjectHeader:
      type: apiKey
      in: header
      name: Project
      description: |
        Nebius project ID associated with the IAM token. Required together
        with `IAMBearerAuth`. Identifies the project context the request is
        scoped to.

````