How to check status of Workflow from web logicapp

Sébastien Lebouteiller 20 Reputation points
2023-10-04T08:14:04.3233333+00:00

hello,

in our days work we have to launch and check several workflow from logicapp (Standard).

We use script from our scheduler (VTOM) and we'd like to check its status in order to be able launch other following workflow but only when we are sure that the first one is over and OK.

To launch we use 'invoke-restmethod' with Powershell script.

We find request in loganalytics but we lose lot of time doing this because logs are not instantly in logs analytics.

Do you know another method to do this?

thanks for you're help.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
0 comments No comments
{count} votes

Answer accepted by question author
  1. MayankBargali-MSFT 70,981 Reputation points Moderator
    2023-10-05T01:50:48.0966667+00:00

    @Sébastien Lebouteiller Thanks for reaching out. Standard logic app runs on functions, and you can use the function endpoint to get the details.

    As you are using the standard logic app so you can use the below endpoints.

    List Workflow: GET https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{StandardLogicAppName}/workflows?api-version=2018-11-01

    Run History: GET https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{StandardLogicAppName}/workflow/workflow/api/management/workflows/{workflowName}/runs?api-version=2018-11-01

    The RunHistory will have the property status that will help you to validate the run status. For reference in the below the last few runs was Failed. Now you can sort with the statTime and get the first value to get the latest run status.

    User's image

    To know more details on the Azure REST API you can refer to this document.

    Please "Accept Answer" if the answer is helpful so that it can help others in the community.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.