---
agentTools:
  projectIndex: https://docs.agilite.io/llms.txt
---

# /files

Returns a File from Agilit-e as an Array Buffer object

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Agilit-e Files",
    "version": "7"
  },
  "servers": [
    {
      "url": "https://api.agilite.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/files": {
      "get": {
        "summary": "/files",
        "description": "Returns a File from Agilit-e as an Array Buffer object",
        "operationId": "files-1",
        "parameters": [
          {
            "name": "record-id",
            "in": "header",
            "description": "The id of the File to be returned",
            "required": true,
            "schema": {
              "type": "string",
              "default": "001"
            }
          },
          {
            "name": "byte-start-range",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "byte-end-range",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "log-profile-key",
            "in": "header",
            "description": "Profile Key of the Batch Logging Profile configured for logging",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "The File is returned as an Array Buffer"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"statusCode\": 400,\n    \"errorMessage\": \"An Error Occurred\",\n    \"additionalMessages\": [\"An Error Occured\"]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "errorMessage": {
                      "type": "string",
                      "example": "An Error Occurred"
                    },
                    "additionalMessages": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "An Error Occured"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "text",
              "code": "\t\tNOTE:\n    - This API won't work via our docs due to the complexity of downloading files"
            }
          ],
          "samples-languages": [
            "text"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "5fc0c5ba525f16005dcefb97:5fc0c5ba525f16005dcefba2"
}
```