Logic App Standard (single tenant) - How to create additional/new workflow in existing logic app using REST API

Kevin 26 Reputation points
2022-08-29T09:29:32.383+00:00

I have and existing Logic App Standard with a few workflows. The goal is to create additional workflows using REST API.

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

Accepted answer
  1. MayankBargali-MSFT 70,536 Reputation points
    2022-08-29T11:37:07.177+00:00

    @Kevin Thanks for reaching out.

    To create a new workflow in your standard logic app. You can change the kind to Stateless or Stateful as per your requirement and update the trigger/action/output in the request body as per your requirement.

    POST
    https://management.azure.com/subscriptions/{subscription ID}/resourceGroups/{resource group name}/providers/Microsoft.Web/sites/{logic app name}/deployWorkflowArtifacts?api-version=2018-11-01
    Authorization: Bearer <your bearer token>

    Request Body:
    {"files":{"<<yourworkflowname>>/workflow.json":{"definition":{"$schema":https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#,"actions":{},"contentVersion":"1.0.0.0","outputs":{},"triggers":{"manual":{"inputs":{},"kind":"Http","type":"Request"}}},"kind":"Stateful"}}}

    To Update the existing workflow in standard logic app

    POST
    https://management.azure.com/subscriptions/{subscription ID}/resourceGroups/{resource group name}/providers/Microsoft.Web/sites/{logic app name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{yourworkflowname}/validate?api-version=2018-11-01
    Authorization: Bearer <your bearer token>

    Request Body:
    {"properties":{"definition":{"$schema":https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#,"actions":{},"contentVersion":"1.0.0.0","outputs":{},"triggers":{"manual":{"inputs":{},"kind":"Http","type":"Request"}}},"kind":"Stateful"}}

    The standard logic app is built on top of the azure function app runtime, and it uses the same REST API as azure function. Make sure to add Content-Type as application/json in the header
    To get familiar with function REST API you can refer to this document. To get familiar with Azure Management API and generating token refer to this document.

    3 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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