0% found this document useful (0 votes)
401 views

Power Automate API

The document discusses how to use the Power Automate Web API to manage cloud flows. It provides examples of making HTTP requests to get a list of flows, create a new flow, update an existing flow, and delete a flow. Key aspects covered include constructing the URL, getting an Azure AD bearer token for authentication, and the properties included in requests and responses.

Uploaded by

oussama kardous
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
401 views

Power Automate API

The document discusses how to use the Power Automate Web API to manage cloud flows. It provides examples of making HTTP requests to get a list of flows, create a new flow, update an existing flow, and delete a flow. Key aspects covered include constructing the URL, getting an Azure AD bearer token for authentication, and the properties included in requests and responses.

Uploaded by

oussama kardous
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Power Automate Web API

Source :
https://learn.microsoft.com/en-us/power-automate/web-api

Compose HTTP requests:


To get started creating requests, you'll need to first construct the URL. The format for the base URL of
the Power Automate Web API is: https://{Organization ID}.{Regional
Subdomain}.dynamics.com/api/data/v9.1/. The two parameters are:

 Organization ID: A unique name for the environment that stores your flows.

 Regional Subdomain: Depends on the location of your environment.

To get these two parameters:

1. Go to the Power Platform admin center.

2. Select the environment you use to build your flows.

3. Copy the organization id and regional subdomain from the Environment URL field.


You can also programmatically get the list of instances that are available to you using the Get
Instances method in the online management API.

Each request to the Web API must have the Accept and Content-type headers set


to application/json.

4. Populate the Authorization header with an Azure AD Bearer token.

To learn how to get an Azure AD Bearer token for Dataverse, go to Use OAuth authentication with
Microsoft Dataverse.

The following is an example of a request:

HTTP:
GET https://org00000000.crm0.dynamics.com/api/data/v9.1/workflows

Accept: application/json

Authorization: Bearer ey...

The response contains the list of flows from within that environment (HTTP):
{

"@odata.context": "https://org00000000.crm0.dynamics.com/api/data/v9.1/$metadata#workflows",

"value": [{

"@odata.etag": "W/\"12116760\"",

"category": 5,

"statecode": 0,

"workflowidunique": "00000000-0000-0000-0000-000000000001",

"workflowid" : "00000000-0000-0000-0000-000000000002",

"createdon": "2018-11-15T19:45:51Z",
"_ownerid_value": "00000000-0000-0000-0000-000000000003",

"modifiedon": "2018-11-15T19:45:51Z",

"ismanaged": false,

"name": "Sample flow",

"_modifiedby_value": "00000000-0000-0000-0000-000000000003",

"_createdby_value": "00000000-0000-0000-0000-000000000003",

"type": 1,

"description": "This flow updates some data in Dataverse.",

"clientdata": "{\"properties\":{\"connectionReferences\":{\"shared_commondataservice\":
{\"source\":\"NotSpecified\",\"id\":\"/providers/Microsoft.PowerApps/apis/
shared_commondataservice\",\"tier\":\"NotSpecified\"}},\"definition\":{...}},\"schemaVersion\":\"1.0.0.0\"}"

}]

List flows:
As shown previously, you can get the list of workflows by calling GET on workflows. Each workflow has
many properties, but the most relevant are listed in the following table.

Property name Description


category The category of the flow. Here are the different categories.
0 - Classic Dataverse workflows.
1 - Classic Dataverse dialogs.
2 - Business rules.
3 - Classic Dataverse actions.
4 - Business process flows.
5 - Automated, instant or scheduled flows.
6 - Desktop flows.
statecode The status of the flow. The status can be 0 - off or 1 - on.
workflowidunique The unique identifier for this installation of the flow.
workflowid The unique identifier for a cloud flow across all imports.
createdon The date when the flow was created.
_ownerid_value The unique identifier of the user or team who owns the flow. This is an id from the
systemusers table in Dataverse.
modifiedon The last time the flow was updated.
ismanaged Indicates if the flow was installed via a managed solution.
name The display name that you have given the flow.
_modifiedby_value The last user who updated the flow. This is an id from the systemusers table in
Dataverse.
_createdby_value The user who created the flow. This is an id from the systemusers table in Dataverse.
type Indicates if the flow is a running flow, or a template that can be used to create more
flows. 1 - flow, 2 - activation or 3 - template.
description The user-provided description of the flow.
clientdata A string-encoded JSON of the flow definition and its connectionReferences.
To learn more about properties, fields, and their usage, go to Process (Workflow) table/entity reference.

You can also request specific properties, filter the list of flows, and more, as described in Query data
using the Web API. For example, this query returns only the automated, instant, or scheduled flows that
are currently on:

HTTP:

GET https://org00000000.crm0.dynamics.com/api/data/v9.1/workflows?$filter=category eq 5 and statecode eq


1

Accept: application/json

Authorization: Bearer ey...

Create a cloud flow:


Call POST on the workflows collection to create a cloud flow. The required properties for automated,
instant, and scheduled flows are: category, name, type, primaryentity, and clientdata. Use none for the
primaryentity for these types of flows.

You can also provide a description and statecode.

HTTP:

POST https://org00000000.crm0.dynamics.com/api/data/v9.1/workflows

Accept: application/json

Authorization: Bearer ey...

Content-type: application/json

"category": 5,

"statecode": 0,

"name": "Sample flow name",

"type": 1,

"description": "This flow reads some data from Dataverse.",

"primaryentity":"none",

"clientdata": "{\"properties\":{\"connectionReferences\":{\"shared_commondataservice\":
{\"connectionName\":\"shared-commondataser-00000000-0000-0000-0000-
000000000004\",\"source\":\"Invoker\",\"id\":\"/providers/Microsoft.Power
Apps/apis/shared_commondataservice\"}},\"definition\":{\"$schema\":
\"https:\/\/fanyv88.com:443\/https\/schema.management.azure.com\/providers\/Microsoft.Logic\/schemas\/2016-06-01\/
workflowdefinition.json#\",\"contentVersion\": \"1.0.0.0\",\"parameters\": {\"$connections\":
{\"defaultValue\": {},\"type\": \"Object\"},\"$authentication\": {\"defaultValue\":
{},\"type\": \"SecureObject\"}},\"triggers\": {\"Recurrence\": {\"recurrence\":
{\"frequency\": \"Minute\",\"interval\": 1},\"type\": \"Recurrence\"}},\"actions\": {\"List_records\":
{\"runAfter\": {},\"metadata\": {\"flowSystemMetadata\":
{\"swaggerOperationId\": \"GetItems_V2\"}},\"type\": \"ApiConnection\",\"inputs\": {\"host\": {\"api\":
{\"runtimeUrl\": \"https:\/\/fanyv88.com:443\/https\/firstrelease-001.azure-apim.net\/apim\/commondataservice\"},\"connection\":
{\"name\": \"@parameters('$connections')['shared_commondataservice']
['connectionId']\"}},\"method\": \"get\",\"path\":
\"\/v2\/datasets\/@{encodeURIComponent(encodeURIComponent('default.cds'))}\/tables\/
@{encodeURIComponent(encodeURIComponent('accounts'))}\/items\",\"queries\": {\"$top\":
1},\"authentication\": \"@parameters('$authentication')\"}}},\"outputs\":
{}}},\"schemaVersion\":\"1.0.0.0\"}"

The most important section is the clientdata, which contains the connectionReferences that the flow
uses, and the definition of the flow. The connectionReferences are the mappings to each connection
that the flow uses.

There are three properties:

Property name Description


connectionName Identifies the connection. You can see the connectionName by going to
the Connections page and then copying it from the URL of the connection.
source Either Embedded or Invoker. Invoker is only valid for instant flows (where a user
selects a button to run the flow), and indicates that the end user will provide the
connection. In this case, the connectionName is only used at design time. If the
connection is Embedded, that means the connectionName you specify is always used.
id The identifier of the connector. The id always starts
with /providers/Microsoft.PowerApps/apis/ and then has the connector
name, which you can copy from the URL of the connection or by selecting the
connector from the Connectors page.

Once you execute the POST request, you'll receive the OData-EntityId header, which will contain
the workflowid for your new flow.

Update a cloud flow:


You can call PATCH on the workflow to update, turn on, or turn off a cloud flow. Use
the workflowid property to make these calls. For example, you can update the description and the
owner of the flow with the following call:

HTTP:

PATCH https://org00000000.crm0.dynamics.com/api/data/v9.1/workflows(00000000-0000-0000-0000-
000000000002)

Accept: application/json
Authorization: Bearer ey...

Content-type: application/json

"description" : "This flow will ensure consistency across systems.",

"[email protected]": "systemusers(00000000-0000-0000-0000-000000000005)"

Note:

The syntax for changing the owner uses the odata.bind format. This means instead of patching the
_ownerid_value field directly, you append @odata.bind to the property name and then wrap the ID
with systemusers().

In another example, you can turn on a cloud flow with this call:

HTTP:

PATCH https://org00000000.crm0.dynamics.com/api/data/v9.1/workflows(00000000-0000-0000-0000-
000000000002)

Accept: application/json

Authorization: Bearer ey...

Content-type: application/json

"statecode" : 1

Delete a cloud flow:


Delete a cloud flow with a DELETE call:

HTTP:

DELETE https://org00000000.crm0.dynamics.com/api/data/v9.1/workflows(00000000-0000-0000-0000-
000000000002)

Accept: application/json
Authorization: Bearer ey...

Note

You can't delete a cloud flow that's turned on. You must first turn off the flow or else you'll see this
error: Cannot delete an active workflow definition. To learn more, go to Update a cloud
flow in this article.

Get all users with whom a cloud flow is shared:


Listing the users with access uses a function in Dataverse. This function takes a single parameter
of Target:

HTTP:

GET
https://org00000000.crm0.dynamics.com/api/data/v9.1/RetrieveSharedPrincipalsAndAccess(Target=@ti
d)?@tid={'@odata.id':'workflows(00000000-0000-0000-0000-000000000002)'}

Accept: application/json

Authorization: Bearer ey...

The Target parameter is a JSON-like string with a single property called @odata.id. Replace the


workflow ID in the previous example. It returns:

HTTP :

"@odata.context":
"https://org00000000.crm0.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.RetrieveS
haredPrincipalsAndAccessResponse",

"PrincipalAccesses": [

"AccessMask": "ReadAccess",

"Principal": {

"@odata.type": "#Microsoft.Dynamics.CRM.systemuser",

"ownerid": "00000000-0000-0000-0000-000000000005"

}
}

Share or unshare a cloud flow:


You can share a cloud flow using the GrantAccess action.

HTTP:

POST https://org00000000.crm0.dynamics.com/api/data/v9.1/GrantAccess

Accept: application/json

Authorization: Bearer ey...

Content-type: application/json

"Target" : {

"@odata.type": "Microsoft.Dynamics.CRM.workflow",

"workflowid" : "00000000-0000-0000-0000-000000000002"

},

"PrincipalAccess": {

"Principal": {

"@odata.type" : "Microsoft.Dynamics.CRM.systemuser",

"ownerid" : "00000000-0000-0000-0000-000000000005"

},

"AccessMask": "ReadAccess"

The AccessMask parameter is a field with the following values for different permission levels:

Name Description
None No access.
ReadAccess The right to read the flow.
WriteAccess The right to update the flow.
DeleteAccess The right to delete the flow.
ShareAccess The right to share the flow.
AssignAccess The right to change the owner of the flow.

You can combine permissions with a comma. For example, you can provide the ability to read and
update a cloud flow by passing ReadAccess,WriteAccess.

You can unshare a cloud flow with the RevokeAccess action. Here's an example:

HTTP:

POST https://org00000000.crm0.dynamics.com/api/data/v9.1/RevokeAccess

Accept: application/json

Authorization: Bearer ey...

Content-type: application/json

"Target" : {

"@odata.type": "Microsoft.Dynamics.CRM.workflow",

"workflowid" : "00000000-0000-0000-0000-000000000002"

},

"Revokee": {

"@odata.type" : "Microsoft.Dynamics.CRM.systemuser",

"ownerid" : "00000000-0000-0000-0000-000000000005"

RevokeAccess removes all permissions granted in the AccessMask.

Export flows:
Use the ExportSolution action to export flows to a .zip file. First, add the flows that you want to
a solution.

Once your flow is in a solution, call the following action:

HTTP:
POST https://org00000000.crm0.dynamics.com/api/data/v9.1/ExportSolution

Accept: application/json

Authorization: Bearer ey...

Content-type: application/json

"SolutionName" : "Awesome solution 1",

"Managed": false

ExportSolution returns a base 64-encoded string in the ExportSoutionFile property.

HTTP:

"@odata.context":
"https://org00000000.crm0.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.ExportSol
utionResponse",

"ExportSolutionFile": "UEsDBBQAAgAI..."

You can then save this file into source control and/or use whatever version management or distribution
system you want.

Import flows:
Call the ImportSolution action to import a solution.

Property name Description


OverwriteUnmanagedCustomizations If there are existing instances of these flows in
Dataverse, this flag needs to be set to true to import
them. Otherwise they won't be overwritten.
PublishWorkflows Indicates if classic Dataverse workflows will be
activated on import. This setting doesn't apply to other
types of flows.
ImportJobId Provides a new, unique GUID to track the import job.
CustomizationFile A base 64-encoded zip file that contains the solution.

HTTP:

POST https://org00000000.crm0.dynamics.com/api/data/v9.1/ImportSolution
Accept: application/json

Authorization: Bearer ey...

Content-type: application/json

"OverwriteUnmanagedCustomizations": false,

"PublishWorkflows" : true,

"ImportJobId" : "00000000-0000-0000-0000-000000000006",

"CustomizationFile" : "UEsDBBQAAgAI..."

Since import is a long-running operation, the response to the ImportSolution action will be a 204 No
content. To track the progress, call a GET on the importjobs object, providing the ImportJobId that
you included in the original ImportSolution action.

HTTP:

GET https://org00000000.crm0.dynamics.com/api/data/v9.1/importjobs(00000000-0000-0000-0000-
000000000006)

Accept: application/json

Authorization: Bearer ey...

This call returns the status of the import operation, including progress (the percentage of
completion), startedon, and completedon (if import finished).

Once import has completed successfully, you'll need to set up the connections for the flow. The reason
is that the connectionNames likely will be different in the destination environment (if the connections
exist at all). If you're setting up new connections in the destination environment, then the owner of the
flows must create them in the Power Automate designer. If the connections are already set up in the
new environment, then you can PATCH the clientData of the flow with the names of the connections.
Power Automate Management

Source:
https://learn.microsoft.com/en-us/connectors/flowmanagement/
#first-party

Cancel Flow Run


Operation ID:
CancelFlowRun

Cancel a flow run.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow
Run ID runId True string The ID of the flow run to resubmit.

Create Connection
Operation ID:
CreateConnection

Create a connection for the given connector in an environment.


Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Connector apiName True string Select connector
connection connection dynamic Connection

Returns
The outputs of this operation are dynamic.

Create Flow
Operation ID:
CreateFlow

Create flow

Parameters
Name Key Required Type Description
Environment environmentName True string Select
environment
Flow Name name string
Flow Display displayName True string
Name
Flow State state True string
Connection Name connectionName string
Connection displayName string
Display Name
Connector Id id True string
Either Embedded source string
or Invoker
connection
Logical name of connectionReferenceLogicalName string
the connection
reference
Connector Name name string
Connector displayName string
Display Name
Connection createdTime date-time
Created Time
Connector primaryRuntimeUrl string
Runtime Url
Connector Icon iconUri string
Url
Connector is isCustomApi boolean
Custom Api
Connector Tier tier string
Flow Created createdTime date-time
Time
Flow Modified lastModifiedTime date-time
Time
Flow Template templateName string
Name
Flow Trigger flowTriggerUri string
Uri
Flow installationStatus string
Installation
Status
Creator tenant tenantId True string
ID
Creator object objectId string
ID
Creator user ID userId True string
Creator user userType True string
type
Flow trigger type string
type
Flow trigger kind string
kind
Action type type string
Swagger swaggerOperationId string
operation Id
Action Api name name string
Action Api id id string
Action Api type type string

Returns
Body Flow

Delete Flow
Operation ID:
DeleteFlow

Delete the given flow in an environment

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow

Get Connector
Operation ID:
GetApi

Get the given connector in an environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Connector apiName True string Select connector

Returns
The outputs of this operation are dynamic.

Get Flow
Operation ID:
GetFlow

Get the given flow in an environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow

Returns
Body FlowWithConnectionReferences

Get Flow as Admin


Operation ID:
AdminGetFlow

Get the given flow from an environment you have admin access to.

Parameters

Name Key Required Type Description


Environment environmentName True string Select environment
Flow flowName True string Select flow

Returns
Body AdminFlowWithConnectionReferences

List Callback URL


Operation ID:
ListCallbackUrl

List callback URL for the given flow in an environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow

Returns
Body FlowListCallbackUrlResponse

List Connectors
Operation ID:
ListApis

Lists all of the connectors available in the given environment. This list will include custom connectors as well as
the built-in connectors.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment

Returns
Body ResourceArray[ApiWithoutConnectionParameters]

List Flow Owners


Operation ID:
ListFlowOwners

List all owners of the given flow in an environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow

Returns
Body ResourceArray[FlowPermission]

List Flow Run-Only Users


Operation ID:
ListFlowUsers

List all run only users of the given flow in an environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow
Returns
Body ResourceArray[FlowPermission]

List Flows as Admin


Operation ID:
ListFlowsInEnvironment

List all flows in the given environment you have admin access to.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment

Top count $top integer Top count


Expand Suspension expandSuspensionInfo boolean Expands the suspension
Info information

Include Soft- includeSoftDeletedFlow boolean Whether or not to include


Deleted Flows s soft-deleted flows.

Returns
Body ResourceArray[AdminFlow]

List Flows as Admin (V2)


Operation ID:
ListFlowsInEnvironment_V2

List all flows in the given environment you have admin access to. This V2 action is a higher performance action
that returns only the identifying information about the flow. The flow definition and much of the metadata is not
returned. For additional metadata and the flow definition, make a subsequent call to the Get Flows as Admin
action.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment

Top count $top integer Top count


Expand Suspension expandSuspensionInfo boolean Expands the suspension
Info information

Include Soft- includeSoftDeletedFlow boolean Whether or not to include soft-


Deleted Flows s deleted flows.

Returns
Body ResourceArray[AdminFlowWithoutDefinition]
List My Connections
Operation ID:
ListConnections

Lists all your connection available in the given environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment

Returns
Body ResourceArray[ConnectionWithoutConnectionParameters]

List My Environments
Operation ID:
ListUserEnvironments

List the environments you have access to.

Returns
Body ResourceArray[Environment]

List My Flows
Operation ID:
ListMyFlows

List all flows you created in the given environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment

Returns
Body ResourceArray[AdminFlow]

Modify Flow Owners


Operation ID:
ModifyFlowOwners

Modify owners of the given flow in an environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow
Add User Object Id id True string
Add User Type type True string
Remove User Object Id id True string

Remove User Type type True string

Modify Flow Owners as Admin


Operation ID:
AdminModifyFlowOwners

Modify owners of the given flow created in an environment you have admin access to.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment

Flow flowName True string Select flow


Add User Object Id id True string
Add User Type type True string
Remove User Object Id id True string

Remove User Type type True string

Modify Run-Only Users


Operation ID:
ModifyRunOnlyUsers

Modify run-only users of the given flow in an environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment

Flow flowName True string Select flow


Add User Object Id id True string
Add User Type type True string
Remove User Object Id id True string

Remove User Type type True string

Restore Deleted Flow as Admin


Operation ID:
AdminRestoreFlow

Restore the given soft-deleted flow in an environment you have admin access to.
Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow

Returns
Body AdminFlowWithConnectionReferences

Resubmit Flow
Operation ID:
ResubmitFlow

Resubmit the given flow run in an environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow
Trigger Name triggerName True string Name of the flow trigger to resubmit.

Run ID runId True string The ID of the flow run to resubmit.

Turn Off Flow


Operation ID:
StopFlow

Stop the given flow in an environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow

Turn On Flow
Operation ID:
StartFlow

Start the given flow in an environment.

Parameters
Name Key Required Type Description
Environment environmentName True string Select environment
Flow flowName True string Select flow
Update Flow
Operation ID:
UpdateFlow

Update the given flow in an environment.

Parameters
Name Key Require Type Description
d
Environment environmentName True string Select
environment
Flow flowName True string Select flow
Flow Name name string
Flow Display Name displayName True string
Flow State state True string
Connection Name connectionName string
Connection Display Name displayName string
Connector Id id True string
Either Embedded or source string
Invoker connection

Logical name of the connectionReferenceLogicalName string


connection reference

Connector Name name string

Connector Display Name displayName string

Connection Created Time createdTime date-


time
Connector Runtime Url primaryRuntimeUrl string

Connector Icon Url iconUri string

Connector is Custom Api isCustomApi boolean

Connector Tier tier string

Flow Created Time createdTime date-


time
Flow Modified Time lastModifiedTime date-
time

Flow Template Name templateName string

Flow Trigger Uri flowTriggerUri string

Flow Installation Status installationStatus string

Creator tenant ID tenantId True string


Creator object ID objectId string

Creator user ID userId True string

Creator user type userType True string

Flow trigger type type string

Flow trigger kind kind string

Action type type string


Swagger operation Id swaggerOperationId string

Action Api name name string

Action Api id id string

Action Api type type string

Returns
Body Flow

Definitions :
ResourceArray[ApiWithoutConnectionParameters]

Name Path Type Description


value value array of ApiWithoutConnectionParameters

ResourceArray[ConnectionWithoutConnectionParameters]

Name Path Type Description


value value array of ConnectionWithoutConnectionParameters

ResourceArray[Environment]

Name Path Type Description


value value array of Environment

ResourceArray[AdminFlow]

Name Path Type Description


value value array of AdminFlow

ResourceArray[AdminFlowWithoutDefinition]

Name Path Type Description


value value array of AdminFlowWithoutDefinition
ResourceArray[FlowPermission]

Name Path Type Description


value value array of FlowPermission

FlowPermission

Name Path Type Description


Permission Name name string
properties properties PermissionProperties

PermissionProperties

Name Path Type Description


roleName roleName string
principal principal Principal

Principal

Name Path Type Description


Object Id id string
Display Name displayName string
Email email string
Type type string
Tenant Id tenantId string
Principal Name userPrincipalName string
Owner Thumbnail Photo thumbnailPhoto string

Flow

Name Path Type Description


Flow Name name string
properties properties FlowProperties

FlowProperties

Name Path Type Description


Flow Display Name displayName string
Flow State state string
connectionReferences connectionReferences ConnectionReferencesDictionary
Flow Created Time createdTime date-time
Flow Modified Time lastModifiedTime date-time
Flow Template Name templateName string
Flow Trigger Uri flowTriggerUri string
Flow Installation Status installationStatus string

FlowListCallbackUrlResponse

Name Path Type Description


Callback URL response.value string

FlowWithConnectionReferences
Name Path Type Description
Flow Name name string
properties properties FlowWithConnectionReferencesProperties

FlowWithConnectionReferencesProperties

Name Path Type Description


Flow Display Name displayName string
Flow State state string
connectionReferences connectionReferences ConnectionReferencesArray
Flow Created Time createdTime date-time
Flow Modified Time lastModifiedTime date-time
Flow Template Name templateName string
Flow Trigger Uri flowTriggerUri string
Flow Installation Status installationStatus string

creator creator UserIdentity


definitionSummary definitionSummary DefinitionSummary

AdminFlow

Name Path Type Description


Flow Name name string
properties properties AdminFlowProperties

AdminFlowWithoutDefinition

Name Path Type Description


Flow Name name string
properties properties AdminFlowWithoutDefinitionProperties

AdminFlowProperties

Name Path Type Description


Flow Display Name displayName string
Flow State state string
connectionReferences connectionReferences ConnectionReferencesDictionary
Flow Created Time createdTime date-time
Flow Modified Time lastModifiedTime date-time
Flow Template Name templateName string
Flow Trigger Uri flowTriggerUri string
Flow Installation installationStatus string
Status
creator creator UserIdentity
definitionSummary definitionSummary DefinitionSummary
estimatedSuspensionData estimatedSuspensionData EstimatedSuspensionData

AdminFlowWithoutDefinitionProperties

Name Path Type Description


Flow Display Name displayName string

AdminFlowWithConnectionReferences

Name Path Type Description


Flow Name name string
properties properties AdminFlowWithConnectionReferencesProperties

AdminFlowWithConnectionReferencesProperties

Name Path Type Description


Flow Display Name displayName string
Flow State state string
connectionReferences connectionReferences ConnectionReferencesArray
Flow Created Time createdTime date-time
Flow Modified Time lastModifiedTime date-time
Flow Template Name templateName string
Flow Trigger Uri flowTriggerUri string
Flow Installation installationStatus string
Status
creator creator UserIdentity
definitionSummary definitionSummary DefinitionSummary

EstimatedSuspensionData

Name Path Type Description


Flow estimated suspension reason reason string
Flow estimated suspension time time date-time
If the flow is power app plan powerAppPlanExcluded boolean
excluded or not

DefinitionSummary

Name Path Type Description


triggers triggers array of object
Flow trigger type triggers.type string
Flow trigger kind triggers.kind string
actions actions array of object
Action type actions.type string
Swagger operation Id actions.swaggerOperationId string
Action Api name actions.api.name string
Action Api id actions.api.id string
Action Api type actions.api.type string

UserIdentity

Name Path Type Description


Creator tenant ID tenantId string
Creator object ID objectId string
Creator user ID userId string
Creator user type userType string

Environment
Name Path Type Description
Environment Name name string
Environment Location location string
properties properties EnvironmentProperties

EnvironmentProperties

Name Path Type Description


Environment Display Name displayName string
Environment Description description string
Environment Created Time createdTime date-time
Environment Last Modified Time lastModifiedTime date-time
Environment Provisioning State provisioningState string
Environment Creation Type creationType string
Environment Sku environmentSku string
Environment Type environmentType string
Is Default Environment isDefault boolean

ConnectionReferencesArray

Name Path Type Description


Items ConnectionReference

ConnectionReferencesDictionary

ConnectionReference

Name Path Type Description


Connection connectionName string
Name
Connection displayName string
Display Name
Connector Id id string
Either source string
Embedded or
Invoker
connection
Logical name connectionReferenceLogicalName string
of the
connection
reference
apiDefinition apiDefinition ApiWithoutConnectionParameters

ApiWithoutConnectionParameters

Name Path Type Description


Connector Name name string

properties properties ApiPropertiesWithoutConnectionParameters

ApiPropertiesWithoutConnectionParameters

Name Path Type Description


Connector Display Name displayName string
Connection Created Time createdTime date-time
Connector Runtime Url primaryRuntimeUrl string
Connector Icon Url iconUri string
Connector is Custom Api isCustomApi boolean
Connector Tier tier string

ConnectionWithoutConnectionParameters

Name Path Type Description


Connection Name name string

properties properties ConnectionPropertiesWithoutConnectionParameters

ConnectionPropertiesWithoutConnectionParameters

Name Path Type Description

Connector Display Name displayName string

Connector Id apiId string

Connection Created Time createdTime date-time

Connection Last Modified Time lastModifiedTime date-time


Power Automate for Admins

Source:
https://learn.microsoft.com/en-us/connectors/microsoftflowfora
dmins/?source=recommendations

Disable Flow as Admin


Operation ID:

Disable-AdminFlow

Disables a Flow.

Parameters
Name Key Required Type Description
Environment Name environment True string Name field of the Environment.
Flow Name flow True string Name field of the Flow.
Field API Version api-version string The date value of the API version.

Edit Flow Owner Role as Admin


Operation ID:

Edit-AdminFlowOwnerRole

Sets permissions for a Flow.

Parameters
Name Key Required Type Description
Environment Name environment True string Name field of the Environment.

Flow Name flow True string Name field of the flow.


Field API Version api-version string The date value of the API version.

Field Content-Type Content-Type string Name Field of the Content-Type.

id id string Flow permission ID.


email email string Flow permission principal email.

displayName displayName string Flow permission principal displayName.

id id string Flow permission principal object ID.

type type string Flow permission principal type.


roleName roleName string Flow permission property roleName.

Enable Flow as Admin


Operation ID:

Enable-AdminFlow

Enables a Flow.

Parameters
Name Key Required Type Description
Name field of the Environment environment True string Environment Name.

Flow Name flow True string Name field of the flow.


Field API Version api-version string The date value of the API version.

Get Flow Owner Role as Admin


Operation ID:

Get-AdminFlowOwnerRole

Returns permissions for a Flow.

Parameters
Name Key Required Type Description
Environment Name environment True string Name field of the Environment.
Flow Name flow True string Name field of the flow.
Field API Version api-version string The date value of the API version.

Returns
Name Path Type Description
value value array of object Flow permission value object array.

name value.name string Flow permission name field.

id value.id string Flow permission ID field.

type value.type string Flow permission type field.

roleName value.properties.roleName string Flow permission property roleName.

permissionType value.properties.permissionType string Flow permission property permission


type.

id value.properties.principal.id string Flow permission principal object ID.

type value.properties.principal.type string Flow permission principal type.

Get Flow User Details


Operation ID:

Get-AdminFlowUserDetails

Returns the details of a specified user in the scope of Power Automate.

Parameters
Name Key Required Type Description
Field userId userId True string Flow user principal object ID.

Returns
Name Path Type Description
Tenant ID tenantId string Flow user tenantId.
PUID puid string Flow user puid.
Object ID objectId string Flow user principal object ID.
Is Disallowed for isDisallowedForInternalPlans boolean Flow user isDisallowedForInternalPlans.
Internal Plans

Consent Time consentTime date- Flow user consentTime.


time
Service Settings serviceSettingsSelectionTime date- Flow user serviceSettingsSelectionTime.
Selection Time time

Consent Business consentBusinessAppPlatformTime date- The Flow user's


App Platform Time time consentBusinessAppPlatformTime.

Remove Flow Approval


Operation ID:

Remove-AdminFlowApproval

Deletes Flow Approvals.

Parameters
Name Key Required Type Description

Environment Name environment True string Name field of the Environment.

Field userId userId True string Flow user principal object ID.

Field API Version api-version string The date value of the API version.

Remove Flow as Admin


Operation ID:

Remove-AdminFlow

Deletes a Flow.

Parameters
Name Key Required Type Description

Environment Name environment True string Name field of the Environment.


Flow Name flow True string Name field of the flow.
Field API Version api-version string The date value of the API version.

Remove Flow User Details


Operation ID:

Remove-AdminFlowUserDetails

Deletes a Power Automate user details record.


Parameters
Name Key Required Type Description

Field UserId userId True string Flow user principal object ID.

Power Automate has a connector called 'HTTP' that is used to invoke the REST API to the workflow and get the
responses as needed, but this action is only for a premium connection. There is another action called 'Send an
HTTP request to SharePoint' that constructs a SharePoint REST API to invoke. ¹

RESTful APIs can return data that you need for your app in a convenient format (for example JSON or XML). By
using the HTTP action in Power Automate, we can invoke/call an API by using methods GET (read), POST (write),
PUT (update), PATCH (update, but only partially) or DELETE (remove). ⁴

Here are some examples of how to use REST API in Power Automate:

- How to use Rest API in Power Automate [With 23 Examples] ¹

- How to get started with HTTP requests in Power Automate ⁴

- Manage flows with the Power Automate Web API ²

I hope this helps. Let me know if you have any other questions.

Source: Conversation with Bing, 21/03/2023(1) How to use Rest API in Power Automate [With 23 Examples].
https://www.spguides.com/rest-api-in-power-automate/ Accessed 21/03/2023.

(2) How to get started with HTTP requests in Power Automate. https://www.m365princess.com/blogs/2021-02-
10-how-to-get-started-with-http-requests-in-power-automate/ Accessed 21/03/2023.

(3) Manage flows with the Power Automate Web API - Power Automate ....
https://learn.microsoft.com/en-us/power-automate/web-api Accessed 21/03/2023.

(4) How to use an API with Power Automate - Forward Forever. https://forwardforever.com/how-to-use-an-api-
with-power-automate/ Accessed 21/03/2023.

(5) How to use Rest API in Power Automate [With 23 Examples]. https://www.spguides.com/rest-api-in-power-
automate/ Accessed 21/03/2023.

(6) Manage flows with the Power Automate Web API - Power Automate.
https://learn.microsoft.com/en-us/power-automate/web-api Accessed 21/03/2023.

(7) How to use an API with Power Automate - Forward Forever. https://forwardforever.com/how-to-use-an-api-
with-power-automate/ Accessed 21/03/2023.

You might also like