Get list of files
Get a list of files with or without filtering
Function GetFilesList(Val URL, Val Token, Val Count = 10000, Val AdditionalParameters = "", Val AdditionalHeaders = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
URL | --url | String | ✔ | OpenAI server URL |
Token | --token | String | ✔ | OpenAI authorization token |
Count | --limit | Number | ✖ | Maximum number of assistants returned |
AdditionalParameters | --options | Structure Of KeyAndValue | ✖ | Additional request parameters, if necessary |
AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns: Map Of KeyAndValue - Processing result
tip
Method at API documentation: List files
1C:Enterprise/OneScript code example
URL = "https://hut.openintegrations.dev/localai/";
Token = "12We...";
Result = OPI_OpenAI.GetFilesList(URL, Token);
- Bash
- CMD/Bat
oint openai GetFilesList \
--url "https://hut.openintegrations.dev/localai/" \
--token "***"
oint openai GetFilesList ^
--url "https://hut.openintegrations.dev/localai/" ^
--token "***"
Result
{
"data": [
{
"id": "file-36",
"object": "file",
"bytes": 2114025,
"created_at": "2025-07-14T17:24:09.865196292Z",
"filename": "8d1fae3d-4135-41ba-9c02-2e706a20896a.png",
"purpose": "assistants"
},
{
"id": "file-5",
"object": "file",
"bytes": 2114025,
"created_at": "2025-08-30T20:53:39.908215998Z",
"filename": "f92bf158-291d-4b8f-8b16-5d8064a0952c.png",
"purpose": "assistants"
},
{
"id": "file-5",
"object": "file",
"bytes": 2114025,
"created_at": "2025-08-31T16:37:44.970027396Z",
"filename": "abf1f8e9-f6a3-4c98-8322-ceb12d2f8868.png",
"purpose": "assistants"
},
{
"id": "file-7",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-07T17:41:29.472968922Z",
"filename": "6b4e8148-5c29-46ea-af84-82b5e3bf1447.png",
"purpose": "user_data"
},
{
"id": "file-8",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-08T11:53:22.677955061Z",
"filename": "3fafe0df-0c21-4f90-963c-f4b0d4d58135.png",
"purpose": "assistants"
},
{
"id": "file-4",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-08T20:12:10.0346231Z",
"filename": "3ed1c87f-09c0-48b7-9ffa-5f51a5d05585.png",
"purpose": "user_data"
},
{
"id": "file-4",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-11T18:15:25.545940727Z",
"filename": "26538245-7073-4f5b-af8c-44e00719777c.png",
"purpose": "user_data"
},
{
"id": "file-4",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-12T17:06:37.859052311Z",
"filename": "40f8d10f-88a7-4c84-8bc8-c31ecaefca7f.png",
"purpose": "user_data"
},
{
"id": "file-7",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-12T20:30:27.5584618Z",
"filename": "2cd972ba-42a0-407e-9ee5-a88c2295fbe9.png",
"purpose": "user_data"
},
{
"id": "file-4",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-15T07:14:52.007926108Z",
"filename": "1ac46a8b-51f9-4c25-829a-0d77f2e1d07a.png",
"purpose": "user_data"
},
{
"id": "file-7",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-15T09:01:29.495497457Z",
"filename": "16c8e0c2-7b36-41c3-8167-67f09ed44876.png",
"purpose": "user_data"
},
{
"id": "file-12",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-15T13:28:56.741982193Z",
"filename": "074cd27a-9288-419b-90dd-fb0640017bbd.png",
"purpose": "assistants"
},
{
"id": "file-1",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-15T15:30:24.105006087Z",
"filename": "b5047ac1-93d2-47e2-b073-8e9d4ab74f08.png",
"purpose": "user_data"
},
{
"id": "file-1",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-15T17:24:12.257103258Z",
"filename": "addcc9cb-7b6b-44be-89c0-f2f8a85b58b5.png",
"purpose": "user_data"
},
{
"id": "file-4",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-15T18:51:53.906135172Z",
"filename": "f5f08e2e-a903-4213-9970-467459837f87.png",
"purpose": "user_data"
},
{
"id": "file-7",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-15T21:13:41.960390784Z",
"filename": "74f1ecd2-56ba-4ffe-943e-46ef68320057.png",
"purpose": "user_data"
},
{
"id": "file-10",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-16T00:23:15.874713981Z",
"filename": "e48e746c-b206-402a-8344-59108131113e.png",
"purpose": "user_data"
},
{
"id": "file-12",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-16T00:27:13.526537069Z",
"filename": "4ab5d04d-4296-4572-a912-f2334a88a5c9.png",
"purpose": "assistants"
}
],
"object": "list"
}