WorkflowsClient.GetWorkflows(RequestContext) Method

Definition

[Protocol Method] List all workflows.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Pageable<BinaryData> GetWorkflows (Azure.RequestContext context);
abstract member GetWorkflows : Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetWorkflows : Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetWorkflows (context As RequestContext) As Pageable(Of BinaryData)

Parameters

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The Pageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.

Exceptions

Service returned a non-success status code.

Examples

This sample shows how to call GetWorkflows and parse the result.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
WorkflowsClient client = new WorkflowsClient(endpoint, credential);

foreach (BinaryData item in client.GetWorkflows(null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString());
    Console.WriteLine(result.GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("isEnabled").ToString());
    Console.WriteLine(result.GetProperty("description").ToString());
}

This sample shows how to call GetWorkflows with all parameters and parse the result.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
WorkflowsClient client = new WorkflowsClient(endpoint, credential);

foreach (BinaryData item in client.GetWorkflows(null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString());
    Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossaryHierarchy").ToString());
    Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underCollection").ToString());
    Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossary").ToString());
    Console.WriteLine(result.GetProperty("createdTime").ToString());
    Console.WriteLine(result.GetProperty("createdBy").ToString());
    Console.WriteLine(result.GetProperty("lastUpdateTime").ToString());
    Console.WriteLine(result.GetProperty("updatedBy").ToString());
    Console.WriteLine(result.GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("isEnabled").ToString());
    Console.WriteLine(result.GetProperty("description").ToString());
}

Applies to