How to retrieve Single Tenant Azure Logic App workflow run action inputs and outputs via the REST API

Robert Lawrie 56 Reputation points
2022-02-10T10:47:05.293+00:00

I'm trying to drill into a workflow run action via the REST API, my goal being to retrieve the action inputs and outputs. Is there a way to do this for Single Tenant / Standard Azure Logic Apps?

So far I have tried the following request

[Post] https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{LogicAppName}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{WorkflowName}/runs/{RunName}/actions/{ActionName}/listExpressionTraces?api-version=2018-11-01

ContentType = 'application/json'

But I receive the error:

Invoke-RestMethod : {"Code":"BadRequest","Message":"Encountered an error (InternalServerError) from host runtime.","Target":null,"Details":[{"Message":"Encountered an error (InternalServerError) from host runtime."},{"Code":"BadRequest"},{"ErrorEntity":{"Code":"BadRequest","Message":"Encountered an error (InternalServerError)
from host runtime."}}],"Innererror":null}

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

Accepted answer
  1. MayankBargali-MSFT 68,471 Reputation points
    2022-02-10T11:18:29.917+00:00

    @Robert Lawrie You can leverage the Get Run history for a particular workflow as mentioned here. Once you have the runID's you can leverage below which will give the action, trigger, workflow parameter and you can get any input/output from any of your trigger/actions for a particular run ID in your workflow.

    GET
    /subscriptions/{subscription ID}/resourceGroups/{resourcegroup name}/providers/Microsoft.Web/sites/{standard logicapp name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflow name}/runs/{runID}?api-version=2018-11-01&$expand=properties/actions,workflow/properties

    Output:
    173079-image.png

    0 comments No comments

0 additional answers

Sort by: Most helpful