AgentSessionFiles.GetSessionFilesAsync Method

Definition

List files and directories at a given path in the session sandbox. Returns only the immediate children of the specified directory (non-recursive). If path is not provided, lists the session home directory.

public virtual System.ClientModel.AsyncCollectionResult<Azure.AI.Projects.Agents.SessionDirectoryEntry> GetSessionFilesAsync(string agentName, string agentSessionId, string sessionStoragePath = default, string userIsolationKey = default, int? limit = default, Azure.AI.Projects.Agents.AgentListOrder? order = default, string after = default, string before = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSessionFilesAsync : string * string * string * string * Nullable<int> * Nullable<Azure.AI.Projects.Agents.AgentListOrder> * string * string * System.Threading.CancellationToken -> System.ClientModel.AsyncCollectionResult<Azure.AI.Projects.Agents.SessionDirectoryEntry>
override this.GetSessionFilesAsync : string * string * string * string * Nullable<int> * Nullable<Azure.AI.Projects.Agents.AgentListOrder> * string * string * System.Threading.CancellationToken -> System.ClientModel.AsyncCollectionResult<Azure.AI.Projects.Agents.SessionDirectoryEntry>
Public Overridable Function GetSessionFilesAsync (agentName As String, agentSessionId As String, Optional sessionStoragePath As String = Nothing, Optional userIsolationKey As String = Nothing, Optional limit As Nullable(Of Integer) = Nothing, Optional order As Nullable(Of AgentListOrder) = Nothing, Optional after As String = Nothing, Optional before As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncCollectionResult(Of SessionDirectoryEntry)

Parameters

agentName
String

The name of the agent.

agentSessionId
String

The session ID.

sessionStoragePath
String

The directory path to list, relative to the session home directory. Defaults to the home directory if not provided.

userIsolationKey
String

Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.

limit
Nullable<Int32>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

order
Nullable<AgentListOrder>

Sort order by the created_at timestamp of the objects. asc for ascending order anddesc for descending order.

after
String

A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

before
String

A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

Service returned a non-success status code.

Applies to