Azure Logic Apps Standard REST APIs (Part I)

Azure Logic Apps Standard REST APIs (Part I)

You may know, and many of you may be familiar with Logic Apps REST APIs that are very well documented by Microsoft here: Azure Logic Apps. However, for those who didn’t know about this, I recommend you to look. They may be handy in specific scenarios. One of these cases is the strategy I documented to get the error message from a particular fail inside Logic App Consumption. You can read more about it here: How to get the Error Message with Logic App Try-Catch (Part II) – Using an Azure Function.

Another great thing about this Microsoft documentation is the availability to try these REST APIs directly from the documentation page!

But there is one major problem! These REST APIs can be applied only to Logic Apps Consumption. There isn’t any REST APIs documentation available for Logic Apps Standard… and yes, they are different. There isn’t until now!

We are going to use the following workflow to test these APIs:

Of course, this is a very simple sample just to demonstrate the APIs.

REST Operation Groups

Like Logic Apps Consumption, Logic App Standard REST APIs are organized in these REST Operation Groups:

  • Workflow Run Actions: Lists workflow run actions.
  • Workflow Runs: Provides operations for listing and canceling workflow runs.
  • Workflow Trigger Histories: Lists workflow trigger histories.
  • Workflow Triggers: Provides operations for listing and running workflow triggers.
  • Workflow Versions: Lists workflow versions.
  • Workflows: Provides operations for creating and managing workflows.

Today we are going to address the first Operation Group: Workflow Run Actions.

Workflow Run Actions

These are the available operations:

  • Get: Gets the history of a specific workflow run action.
  • List: Gets the list history of all workflow run actions.
  • List Expression Traces: Lists a workflow run expression trace.

This list may change since this is not the official list, and many things under the hood are different from Consumption to Standard.

Get

Request URL:

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{logicAppStdName}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runId}/actions/{actionName}?api-version=2018-11-01

URI Parameters:

Name In Required Type Description
subscriptionId path True string The subscription id.
resourceGroupName path True string The resource group name.
logicAppStdName path True string The Logic App Standard name.
workflowName path True string The workflow name.
runId path True string The workflow run id (name).
actionName path True string The workflow action name.
api-version query True string The API version.

Response:

Sample Request:

https://management.azure.com/subscriptions/xxxxxxxx/resourceGroups/RG-SPMSDN-LASTD-POC/providers/Microsoft.Web/sites/LASTD-SPMSDN-EAI-POC/hostruntime/runtime/webhooks/workflow/api/management/workflows/DemoHTTP/runs/08585286433641737811956886654CU00/actions/Initialize_variable?api-version=2018-11-01

Sample Response:

Status Code: 200

{
    "properties": {
        "inputsLink": {
            "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/77611e515f054951b892c7da37d37e8c/runs/08585286433641737811956886654CU00/actions/Initialize_variable/contents/ActionInputs?api-version=2018-11-01&code=xxxxxxx%3d%3d&se=2023-01-06T04%3A00%3A00.0000000Z&sp=%2Fruns%2F08585286433641737811956886654CU00%2Factions%2FInitialize_variable%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=xxxxxxxxx",
            "contentSize": 69
        },
        "startTime": "2023-01-06T00:05:22.8183475Z",
        "endTime": "2023-01-06T00:05:23.4705888Z",
        "correlation": {
            "actionTrackingId": "b8af094f-acd0-48ad-9d08-acee1d10360b",
            "clientTrackingId": "08585286433641737811956886654CU00"
        },
        "status": "Succeeded",
        "code": "NotSpecified"
    },
    "id": "/workflows/DemoHTTP/runs/08585286433641737811956886654CU00/actions/Initialize_variable",
    "name": "Initialize_variable",
    "type": "workflows/runs/actions"
}

List

Request URL:

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{logicAppStdName}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runId}/actions?api-version=2018-11-01

URI Parameters:

Name In Required Type Description
subscriptionId path True string The subscription id.
resourceGroupName path True string The resource group name.
logicAppStdName path True string The Logic App Standard name.
workflowName path True string The workflow name.
runId path True string The workflow run id (name).
api-version query True string The API version.
$filter query False string The filter to apply on the operation. Options for filters include: Status.
$top query False integer
int32
The number of items to be included in the result.

Response:

Sample Request:

https://management.azure.com/subscriptions/xxxxxxxx/resourceGroups/RG-SPMSDN-LASTD-POC/providers/Microsoft.Web/sites/LASTD-SPMSDN-EAI-POC/hostruntime/runtime/webhooks/workflow/api/management/workflows/DemoHTTP/runs/08585286433641737811956886654CU00/actions?api-version=2018-11-01

Sample Response:

Status Code: 200

{
    "value": [
        {
            "properties": {
                "inputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/77611e515f054951b892c7da37d37e8c/runs/08585286433641737811956886654CU00/actions/Initialize_variable/contents/ActionInputs?api-version=2018-11-01&code=xxxxx%3d%3d&se=2023-01-06T04%3A00%3A00.0000000Z&sp=%2Fruns%2F08585286433641737811956886654CU00%2Factions%2FInitialize_variable%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=xxxxxx",
                    "contentSize": 69
                },
                "startTime": "2023-01-06T00:05:22.8183475Z",
                "endTime": "2023-01-06T00:05:23.4705888Z",
                "correlation": {
                    "actionTrackingId": "b8af094f-acd0-48ad-9d08-acee1d10360b",
                    "clientTrackingId": "08585286433641737811956886654CU00"
                },
                "status": "Succeeded",
                "code": "NotSpecified"
            },
            "id": "/workflows/DemoHTTP/runs/08585286433641737811956886654CU00/actions/Initialize_variable",
            "name": "Initialize_variable",
            "type": "workflows/runs/actions"
        },
        {
            "properties": {
                "inputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/77611e515f054951b892c7da37d37e8c/runs/08585286433641737811956886654CU00/actions/Response/contents/ActionInputs?api-version=2018-11-01&code=xxxxx%3d%3d&se=2023-01-06T04%3A00%3A00.0000000Z&sp=%2Fruns%2F08585286433641737811956886654CU00%2Factions%2FResponse%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=xxxxx",
                    "contentSize": 46
                },
                "outputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/77611e515f054951b892c7da37d37e8c/runs/08585286433641737811956886654CU00/actions/Response/contents/ActionOutputs?api-version=2018-11-01&code=xxxxx%3d%3d&se=2023-01-06T04%3A00%3A00.0000000Z&sp=%2Fruns%2F08585286433641737811956886654CU00%2Factions%2FResponse%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=xxxxxx",
                    "contentSize": 46
                },
                "startTime": "2023-01-06T00:05:23.6343337Z",
                "endTime": "2023-01-06T00:05:23.7654387Z",
                "correlation": {
                    "actionTrackingId": "9fc1530d-a50e-450b-9792-e785462ebfba",
                    "clientTrackingId": "08585286433641737811956886654CU00"
                },
                "status": "Succeeded",
                "code": "OK"
            },
            "id": "/workflows/DemoHTTP/runs/08585286433641737811956886654CU00/actions/Response",
            "name": "Response",
            "type": "workflows/runs/actions"
        }
    ]
}

List Expression Traces

Request URL:

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{logicAppStdName}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runId}/actions/{actionName}/listExpressionTraces?api-version=2018-11-01

URI Parameters:

Name In Required Type Description
subscriptionId path True string The subscription id.
resourceGroupName path True string The resource group name.
logicAppStdName path True string The Logic App Standard name.
workflowName path True string The workflow name.
runId path True string The workflow run id (name).
actionName path True string The workflow action name.
api-version query True string The API version.

Response:

Note: I wasn’t able to successfully test this API. But I assume it will exist.

Stay tuned for the next Operation Group: Workflow Runs.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira

Notes From The Road: 2022 Year In Review

Notes From The Road: 2022 Year In Review

2022… back to normality! Yes and no, nothing will be the same as it was before the COVID-19 pandemic. The pandemic brought many bad things, that we all know, but like everything, there are always two sides to the coin. The reality is that the pandemic forced us to change our existing living style, and with that came also good stuff like remote work (for good) and more freedom of working hours… but yes, it was a year that we recovered more and more our life normality and freedom.

It was a year that I returned to perform live events… especially at my favorite event: INTEGRATE 2022 London + Remote! (I say this without discrediting all the other events, I like them all, but this one I helped create from day one 11/12 years ago!)

and see so many friends I made during these years!

It was also the year I released my SECOND book! This time alongside my dear friends Tom Canter and Lex Hegt: Migrating to BizTalk Server 2020

And was a year, I decided to do more online training courses about Microsoft Enterprise Integration, which means:

  • BizTalk Server on Administration or development topics
  • and Azure Integrations Services (Logic Apps Standard and Consumption, API Management, Azure Service Bus, and Functions)

One of these examples is this short and intense BizTalk Server training course that I do alongside my friends Stephen W. Thomas and Lex Hegt.

My Blog has still solid numbers and growing every year…

The numbers of my blog kept solid in terms of visitors and new content, and 2022 was again a very productive year:

  • Publish 70 new posts on my blog;
    • More than 364,107 visits to my blog.
    • Coming from 212 countries across the world in the past year (and more than 15,191 cities).
      • And the countries that most visited my blog are once again the top 3 maintains unchanged: the United States, followed by India, the United Kingdom, and, this time, Canada got the fourth position.
      • In terms of cities, Hyderabad got the first position followed closely by London and Bengaluru.

For me, this is amazing considering the fact I decided this year to do different things, so I dedicate 70% of my community time to doing other stuff them my blog, something that I never did on this scale during these 12 years. And if we compare it to the previous years… not bad indeed:

  • 2021: 375,328 visits, 210 countries, 77 new posts
  • 2020: 392,535 visits, 214 countries, 92 new posts
  • 2019: 431,000 visits, 207countries, 43 new posts
  • 2018: 246,381 visits, 194 countries, 70 new posts
  • 2017: 210,000 visits, 167 countries, 63 new posts (migrate to a new blog)
  • 2016: 318,576 visits, 190 countries, 50 new posts
  • 2015: 350,000 visits, 184 countries, 79 new posts
  • 2014: 310,000 visits, 183 countries, 52 new posts
  • 2013: 200,000 visits, 176 countries, 79 new posts
  • 2012: 170,000 visits, 171 countries, 102 new posts
  • 2011: 91,000 visits, 61 new posts

I want to say thanks to all my readers. I appreciate all the visits to my blog, and thanks for your support.

Attractions in 2022

I’m always surprised by this analysis because my estimates never come out right to what the community consumes but I always like to do this. So, these are the top 10 posts that got the most views in 2022:

  1. Microsoft Integration and Azure Stencils Pack for Visio: New Azure and Dataverse Logos with 14,482 views – note to myself to do more Dynamics 365-oriented posts!
  2. A fish out of water: How to Add connector points on Visio Stencils with 12,621 views – this is for all my friends who make fun of me for writing from time to time about Visio (I’ve been a proud Visio MVP for a year)
  3. SQL Server detected a logical consistency-based I/O error: incorrect pageid in BizTalkMsgBoxDb database with 11,574 views
  4. Logic Apps: How to send a well-formatted HTML Email notification with Office 365 Outlook connector with 10,297 views – this is already a classic one, and I definitely need to come back to this topic!
  5. A fish out of water: PowerShell – The term ‘Invoke-Sqlcmd’ is not recognized as the name of a cmdlet, function, script file, or operable program. with 7,121 views
  6. Azure Breakthroughs: Finding the Azure VM administrator username with 7,121 views – This is a timesaver tip!
  7. The job failed. Unable to determine if the owner (domainusername) of job job-name has server access (reason: Could not obtain information about Windows NT group/user) with 6,890 views
  8. Note to myself: How to perform a CTRL+ALT+DEL inside an Azure Virtual Machine? with 6,357 views
  9. The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security with 5,627 views
  10. Power Automate Best practices, Tips and Tricks: #6 Error handling… configure run after settings with 5,425 views – The only blog from 2022 on the top 10!

And these are some of my 2022 favorite posts:

My 2022 Contributions

I mentioned before that I dedicate 70% of my community time doing other stuff them my blog, but in reality, I spend that amount of time doing different things than the previous years. That means I dedicate less time writing in my blog and doing online events, just to refresh a little… don’t get me wrong I love doing events, but after 21 virtual sessions last year, I was a little tired. So I focus more on writing whitepapers and outside my blog and getting back to code and providing a lot of resources.

More Open Source Contributions…

Continue to improve the existing GitHub contributions and add new ones. Here are some samples:

More whitepapers…

I was able to publish 10 whitepapers:

Don’t forget that I also publish a new book!

Posting outside my blog…

This year, was also the year that I start publishing more blogs and more constantly on other sites, and on that my major partner in crime is Saravana Kumar:

  • Publish 19 guest blog posts on Serveless360 about Azure Integration Services on topics like Logic Apps, API Management, Azure App Configuration, and Power Automate.
  • Publish 20 guest blog posts on BizTalk360 about BizTalk Server.

Speaking engagements…

However, that is not all! I still was able to deliver 21 virtual sessions in several conferences and User Groups worldwide on topics like BizTalk Server, Logic Apps, and Power Automate:

  • M365 Below in Chicago! | January 14, 2022 | Power Automation: A new set of Best practices, tips and tricks
  • Global Automation Bootcamp | February 4, 2022 | How to monitor your integrations solutions with Automation Account
  • Azure Integration Bootcamp | February 5, 2022 | Logic Apps: New set of Best practices, Tips and Tricks
  • Global Power Platform Bootcamp 2022 – Münsterland | February 19, 2022 | How to create robust monitor solutions PowerShell, Azure Functions & Power Automate
  • aMS Lausanne 2022 | April 19, 2022 | LogicApps: New set of Best practices, Tips and Tricks
  • Microsoft 365 Virtual Marathon | May 4, 2022 | Power Automation: Best practices, tips and tricks
  • Global Azure 2022 – Spain | May 6, 2022 | Logic Apps: New set of Best practices, Tips and Tricks
  • Global Azure Bootcamp 2022 Lüdinghausen | May 7, 2022 | Logic Apps: New set of Best practices, Tips and Trick
  • INTEGRATE 2022 | June 13-15, 2022 | Building Hybrid Integration Solutions with BizTalk Server
  • CONNECTED Conference 2022 | November 11, 2022 | Logic Apps: The good, the bad and the ugly
  • Porto.Data | December 20, 2022 | Logic Apps: Error Handling

For all of you…

Once again, thanks for following me, and for reading my blog, and I promise that I will continue to share my knowledge during 2023.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc.

He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.
View all posts by Sandro Pereira