skip to Main Content

I have an Azure Logic App that has failed actions (the number is too big so I won’t resubmit them manually).

I tried wtih the Azure documentation to list all of the operations:

https://learn.microsoft.com/en-us/rest/api/appservice/workflow-trigger-histories/list?view=rest-appservice-2023-12-01&tabs=HTTP

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories?api-version=2023-12-01

However the response seems to be limited to 30 when I do the curl request.
Even through the Azure Portal I don’t get a full list, but only get 40 responses at a time:
Example

Is there a way to list all of the failed actions with 1 request only?

Thanks!

2

Answers


  1. You can add &$top=250 to the URL to get 250 items in the response instead of 30. You can’t get more than 250 items in one go.

    https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories?api-version=2023-12-01&$top=250

    To get the next items, you have nextLink in your screenshot – keep sending requests to the nextLink URLs until satisfied or until there’s no nextLink.

    Update: You can also filter by Status = Failed by adding the following to the URL: &$filter=status eq 'Failed'

    Supported Status values:

    • Running
    • Waiting
    • Succeeded
    • Cancelled
    • Failed
    Login or Signup to reply.
  2. To fetch the list of trigger history at once, you need to use $top in request URL.

    • I have 57 runs in the workflow. So I used $top=60 and got all the runs.
    • Used the URL in below format.
    GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories?api-version=2023-12-01&$top={$top}
    

    enter image description here

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search