共用方式為


Use external APIs in Workflows

Important

This feature is currently in preview. The Supplemental Terms of Use for Microsoft Azure Previews include additional legal terms that apply to Azure features that are in beta, in preview, or otherwise not yet released into general availability.

You can use workflows to automate some business processes through Microsoft Purview, and the HTTP connector and parse JSON action allow you to integrate your workflows with external applications.

HTTP connector

HTTP connectors use Representational State Transfer (REST) architecture, which allows Microsoft Purview workflows to interact directly with non-Microsoft applications using web requests.

HTTP connector is available in all workflow templates.

Note

To create or edit a workflow, you need the workflow admin role in Microsoft Purview. You can also contact the workflow admin in your collection, or reach out to your collection administrator, for permissions.

  1. To add an HTTP connector, select the + icon in the template where you want to add and select HTTP connector.

    Screenshot of how to add HTTP connector.

  2. Once you select HTTP connector, fill the following parameters:

    1. Host - Request URL you want to call when this connector is executed.
    2. Method - Select one of the following methods. GET, PUT, PATCH, POST and DELETE. These methods correspond to create, read, update and delete operations.
    3. Path - Optionally you can enter request URL Path. You can use dynamic content for this parameter.
    4. Headers - Optionally, you can enter HTTP headers. HTTP headers let the client and the server pass additional information with an HTTP request or response
    5. Queries - Optionally, you can pass queries.
    6. Body - Optionally, you can pass HTTP body while invoking the URL
    7. Authentication - HTTP connector is integrated with your Microsoft Purview credentials. Depending on the URL, you can invoke one of these three types:
      1. None (no authentication)
      2. Basic authentication - using a basic authentication credential you've already created.
      3. Service principal - using a service principal credential you've already created, and an audience. The audience will be the intended consumer of the access token. The Microsoft Purview audience for example: https://purview.azure.net/.default Make sure your service principal is authorized to call corresponding services, like ARM.

    Screenshot of how to add HTTP connector properties.

  3. By default, secure settings are turned on for HTTP connectors. To turn OFF secure inputs and outputs select the ellipsis icon (...) to go to settings.

    Screenshot of how to add HTTP connector settings.

  4. You're now presented with the settings for HTTP connector and you can turn secure inputs and outputs OFF.

    Screenshot of how to add HTTP connector secure input and outputs.

Parse JSON action

The parse JSON action in workflows allows you to take an incoming JSON from HTTP (or any other action/connector), and parse the JSON to extract values for use in your workflow.

The parse JSON action is available in all workflows.

Screenshot of the workflows parse JSON action, showing its parameters filled out with sample data.

The parse JSON action has two parameters:

  • Content - a variable that should contain the JSON you want to parse.
  • Schema - the schema of the incoming JSON, which allows the workflow to parse the incoming information. You can supply your own, or use the Generate from sample button. If you generate from a sample, you'll enter a sample JSON payload and a schema will be automatically generated for you.

Actions and connectors in the workflow after the parse JSON action will be able to use the values extracted from the JSON by selecting Add dynamic content for any parameters.

Screenshot of another connector with values from the Parse JSON action added.

Next steps

For more information about workflows, see these articles: