Skip to main content

files

Creates, updates, deletes, gets or lists a files resource.

Overview

Namefiles
TypeResource
Idazure.ai_agents.files

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier, which can be referenced in API endpoints. Required.
bytesintegerThe size of the file, in bytes. Required.
created_atstring (date-time)The Unix timestamp, in seconds, representing when this object was created. Required.
filenamestringThe name of the file. Required.
objectstringThe object type, which is always 'file'. Required. Default value is "file".
purposestringThe intended purpose of a file. Required. Known values are: "assistants", "assistants_output", and "vision". (assistants, assistants_output, vision)
statusstringThe state of the file. This field is available in Azure OpenAI only. Known values are: "uploaded", "pending", "running", "processed", "error", "deleting", and "deleted". (uploaded, pending, running, processed, error, deleting, deleted)
status_detailsstringThe error message with details in case processing of this file failed. This field is available in Azure OpenAI only.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfile_id, endpointReturns information about a specific file. Does not retrieve file content.
listselectendpointpurposeGets a list of previously uploaded files.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
file_idstringThe ID of the file to retrieve. Required.
purposestringThe purpose of the file. Known values are: "assistants", "assistants_output", and "vision". Default value is None.

SELECT examples

Returns information about a specific file. Does not retrieve file content.

SELECT
id,
bytes,
created_at,
filename,
object,
purpose,
status,
status_details
FROM azure.ai_agents.files
WHERE file_id = '{{ file_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;