Azure Logic Apps Standard REST APIs (Part III)

In my last two blog posts, I documented the Workflow Run Actions, and Workflow Runs REST APIs for Logic App Standard, you can read more about it here:

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 Workflow Trigger Histories REST APIs for Logic App Standard.

Workflow Trigger Histories

These are the available operations:

  • Get: Gets a workflow trigger history.
  • List: Gets a list of workflow trigger histories.
  • Resubmit: Resubmits a workflow run based on the trigger history.

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/icrosoft.Web/sites/{logicAppStdName}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}?api-version=2018-11-01

URI Parameters:

NameInRequiredTypeDescription
subscriptionIdpathTruestringThe subscription id.
resourceGroupNamepathTruestringThe resource group name.
logicAppStdNamepathTruestringThe Logic App Standard name.
workflowNamepathTruestringThe workflow name.
triggerNamepathTruestringThe workflow trigger name.
historyNamepathTruestringThe workflow trigger history name. Corresponds to the run name for triggers that resulted in a run.
api-versionqueryTruestringThe API version.

Response:

NameTypeDescription
200 OKWorkflowTriggerHistoryOK

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/triggers/manual/histories/08585286433641737811956886654CU00?api-version=2018-11-01

Sample Response:

Status Code: 200

{
    "properties": {
        "startTime": "2023-01-06T00:05:21.3134356Z",
        "endTime": "2023-01-06T00:05:22.6998422Z",
        "status": "Succeeded",
        "correlation": {
            "clientTrackingId": "08585286433641737811956886654CU00"
        },
        "inputsLink": {
            "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/77611e515f054951b892c7da37d37e8c/triggers/manual/histories/08585286433641737811956886654CU00/contents/TriggerInputs?api-version=2018-11-01&code=xxxxxxxxx%3d%3d&se=2023-01-06T20%3A00%3A00.0000000Z&sp=%2Ftriggers%2Fmanual%2Fhistories%2F08585286433641737811956886654CU00%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=xxxxxxxx",
            "contentSize": 16
        },
        "outputsLink": {
            "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/77611e515f054951b892c7da37d37e8c/triggers/manual/histories/08585286433641737811956886654CU00/contents/TriggerOutputs?api-version=2018-11-01&code=xxxxxxx%3d%3d&se=2023-01-06T20%3A00%3A00.0000000Z&sp=%2Ftriggers%2Fmanual%2Fhistories%2F08585286433641737811956886654CU00%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=xxxxxxx",
            "contentSize": 1126
        },
        "fired": true,
        "run": {
            "id": "/workflows/DemoHTTP/runs/08585286433641737811956886654CU00"
        },
        "workflow": {
            "id": "/workflows/DemoHTTP/versions/08585286433748374192",
            "name": "08585286433748374192",
            "type": "workflows/versions"
        }
    },
    "id": "/workflows/DemoHTTP/triggers/manual/histories/08585286433641737811956886654CU00",
    "name": "08585286433641737811956886654CU00",
    "type": "workflows/triggers/histories"
}

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}/triggers/{triggerName}/histories?api-version=2018-11-01

URI Parameters:

NameInRequiredTypeDescription
subscriptionIdpathTruestringThe subscription id.
resourceGroupNamepathTruestringThe resource group name.
logicAppStdNamepathTruestringThe Logic App Standard name.
workflowNamepathTruestringThe workflow name.
triggerNamepathTruestringThe workflow trigger name.
api-versionqueryTruestringThe API version.
$filterqueryFalsestringThe filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId.
$topqueryFalseinteger
int32
The number of items to be included in the result.

Response:

NameTypeDescription
200 OKWorkflowTriggerHistoryListResultOK

Sample Request:

https://management.azure.com/subscriptions/xxxxxxx/resourceGroups/RG-SPMSDN-LASTD-POC/providers/Microsoft.Web/sites/LASTD-SPMSDN-EAI-POC/hostruntime/runtime/webhooks/workflow/api/management/workflows/DemoHTTP/triggers/manual/histories?api-version=2018-11-01

Sample Response:

Status Code: 200

{
    "value": [
        {
            "properties": {
                "startTime": "2023-01-06T00:05:21.3134356Z",
                "endTime": "2023-01-06T00:05:22.6998422Z",
                "status": "Succeeded",
                "correlation": {
                    "clientTrackingId": "08585286433641737811956886654CU00"
                },
                "inputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/xxxxxx/triggers/manual/histories/08585286433641737811956886654CU00/contents/TriggerInputs?api-version=2018-11-01&code=xxxxx%3d%3d&se=2023-01-06T20%3A00%3A00.0000000Z&sp=%2Ftriggers%2Fmanual%2Fhistories%2F08585286433641737811956886654CU00%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=xxxx",
                    "contentSize": 16
                },
                "outputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/xxxx/triggers/manual/histories/08585286433641737811956886654CU00/contents/TriggerOutputs?api-version=2018-11-01&code=xxxxx%3d%3d&se=2023-01-06T20%3A00%3A00.0000000Z&sp=%2Ftriggers%2Fmanual%2Fhistories%2F08585286433641737811956886654CU00%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=xxxxx",
                    "contentSize": 1126
                },
                "fired": true,
                "run": {
                    "id": "/workflows/DemoHTTP/runs/08585286433641737811956886654CU00"
                },
                "workflow": {
                    "id": "/workflows/DemoHTTP/versions/08585286433748374192",
                    "name": "08585286433748374192",
                    "type": "workflows/versions"
                }
            },
            "id": "/workflows/DemoHTTP/triggers/manual/histories/08585286433641737811956886654CU00",
            "name": "08585286433641737811956886654CU00",
            "type": "workflows/triggers/histories"
        },
        {
            "properties": {
                "startTime": "2023-01-05T23:38:54.0737607Z",
                "endTime": "2023-01-05T23:38:54.6800302Z",
                "status": "Succeeded",
                "correlation": {
                    "clientTrackingId": "08585286449514038376808472053CU00"
                },
                "inputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/xxxx/triggers/manual/histories/08585286449514038376808472053CU00/contents/TriggerInputs?api-version=2018-11-01&code=xxxxx%3d%3d&se=2023-01-06T20%3A00%3A00.0000000Z&sp=%2Ftriggers%2Fmanual%2Fhistories%2F08585286449514038376808472053CU00%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=xxxxxx-h_rKlNU",
                    "contentSize": 16
                },
                "outputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/xxxx/triggers/manual/histories/08585286449514038376808472053CU00/contents/TriggerOutputs?api-version=2018-11-01&code=xxxx3d%3d&se=2023-01-06T20%3A00%3A00.0000000Z&sp=%2Ftriggers%2Fmanual%2Fhistories%2F08585286449514038376808472053CU00%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=xxxx",
                    "contentSize": 1131
                },
                "fired": true,
                "run": {
                    "id": "/workflows/DemoHTTP/runs/08585286449514038376808472053CU00"
                },
                "workflow": {
                    "id": "/workflows/DemoHTTP/versions/08585286449696806038",
                    "name": "08585286449696806038",
                    "type": "workflows/versions"
                }
            },
            "id": "/workflows/DemoHTTP/triggers/manual/histories/08585286449514038376808472053CU00",
            "name": "08585286449514038376808472053CU00",
            "type": "workflows/triggers/histories"
        },
        {
            "properties": {
                "startTime": "2023-01-05T23:38:51.7266881Z",
                "endTime": "2023-01-05T23:38:52.3565097Z",
                "status": "Succeeded",
                "correlation": {
                    "clientTrackingId": "08585286449537509247006194196CU00"
                },
                "inputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/xxxx/triggers/manual/histories/08585286449537509247006194196CU00/contents/TriggerInputs?api-version=2018-11-01&code=xxxx%3d%3d&se=2023-01-06T20%3A00%3A00.0000000Z&sp=%2Ftriggers%2Fmanual%2Fhistories%2F08585286449537509247006194196CU00%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=xxxx",
                    "contentSize": 16
                },
                "outputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/xxx/triggers/manual/histories/08585286449537509247006194196CU00/contents/TriggerOutputs?api-version=2018-11-01&code=xxxxx%3d%3d&se=2023-01-06T20%3A00%3A00.0000000Z&sp=%2Ftriggers%2Fmanual%2Fhistories%2F08585286449537509247006194196CU00%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=xxxx",
                    "contentSize": 1131
                },
                "fired": true,
                "run": {
                    "id": "/workflows/DemoHTTP/runs/08585286449537509247006194196CU00"
                },
                "workflow": {
                    "id": "/workflows/DemoHTTP/versions/08585286449696806038",
                    "name": "08585286449696806038",
                    "type": "workflows/versions"
                }
            },
            "id": "/workflows/DemoHTTP/triggers/manual/histories/08585286449537509247006194196CU00",
            "name": "08585286449537509247006194196CU00",
            "type": "workflows/triggers/histories"
        },
        {
            "properties": {
                "startTime": "2023-01-05T23:38:46.3971339Z",
                "endTime": "2023-01-05T23:38:48.5693481Z",
                "status": "Succeeded",
                "correlation": {
                    "clientTrackingId": "08585286449590895092364058803CU00"
                },
                "inputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/xxxx/triggers/manual/histories/08585286449590895092364058803CU00/contents/TriggerInputs?api-version=2018-11-01&code=xxxx%3d%3d&se=2023-01-06T20%3A00%3A00.0000000Z&sp=%2Ftriggers%2Fmanual%2Fhistories%2F08585286449590895092364058803CU00%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=xxxx",
                    "contentSize": 16
                },
                "outputsLink": {
                    "uri": "https://lastd-spmsdn-eai-poc.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/xxxx/triggers/manual/histories/08585286449590895092364058803CU00/contents/TriggerOutputs?api-version=2018-11-01&code=xxxx%3d%3d&se=2023-01-06T20%3A00%3A00.0000000Z&sp=%2Ftriggers%2Fmanual%2Fhistories%2F08585286449590895092364058803CU00%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=xxxx",
                    "contentSize": 1131
                },
                "fired": true,
                "run": {
                    "id": "/workflows/DemoHTTP/runs/08585286449590895092364058803CU00"
                },
                "workflow": {
                    "id": "/workflows/DemoHTTP/versions/08585286449696806038",
                    "name": "08585286449696806038",
                    "type": "workflows/versions"
                }
            },
            "id": "/workflows/DemoHTTP/triggers/manual/histories/08585286449590895092364058803CU00",
            "name": "08585286449590895092364058803CU00",
            "type": "workflows/triggers/histories"
        }
    ]
}

Resubmit

Request URL:

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/icrosoft.Web/sites/{logicAppStdName}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit?api-version=2018-11-01

URI Parameters:

NameInRequiredTypeDescription
subscriptionIdpathTruestringThe subscription id.
resourceGroupNamepathTruestringThe resource group name.
logicAppStdNamepathTruestringThe Logic App Standard name.
workflowNamepathTruestringThe workflow name.
triggerNamepathTruestringThe workflow trigger name.
historyNamepathTruestringThe workflow trigger history name. Corresponds to the run name for triggers that resulted in a run.
api-versionqueryTruestringThe API version.

Response:

NameTypeDescription
202 AcceptedOK

Sample Request:

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

Sample Response:

Status Code: 202

We may also get some errors if you try to resume an invalid instance.

Stay tuned for the next Operation Group: Workflow Triggers.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

turbo360

Back to Top