AgentOptimizationJobs.GetAll Method

Definition

List optimization jobs. Supports cursor pagination and optional status / agent_name filters.

public virtual System.ClientModel.CollectionResult<Azure.AI.Projects.Agents.OptimizationJob> GetAll(int? limit = default, Azure.AI.Projects.Agents.AgentListOrder? order = default, string after = default, string before = default, Azure.AI.Projects.Agents.JobStatus? status = default, string agentName = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAll : Nullable<int> * Nullable<Azure.AI.Projects.Agents.AgentListOrder> * string * string * Nullable<Azure.AI.Projects.Agents.JobStatus> * string * System.Threading.CancellationToken -> System.ClientModel.CollectionResult<Azure.AI.Projects.Agents.OptimizationJob>
override this.GetAll : Nullable<int> * Nullable<Azure.AI.Projects.Agents.AgentListOrder> * string * string * Nullable<Azure.AI.Projects.Agents.JobStatus> * string * System.Threading.CancellationToken -> System.ClientModel.CollectionResult<Azure.AI.Projects.Agents.OptimizationJob>
Public Overridable Function GetAll (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 status As Nullable(Of JobStatus) = Nothing, Optional agentName As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As CollectionResult(Of OptimizationJob)

Parameters

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.

status
Nullable<JobStatus>

Filter to jobs in this lifecycle state.

agentName
String

Filter to jobs targeting this agent name.

cancellationToken
CancellationToken

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

Returns

Exceptions

Service returned a non-success status code.

Applies to