{
  "opencollection": "1.0.0",
  "info": {
    "name": "Microsoft Power Platform REST API",
    "version": "2022-03-01-preview"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "client_credentials",
      "accessTokenUrl": "https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Environments",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Environments",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.powerplatform.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments",
            "params": [
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              },
              {
                "name": "$expand",
                "value": "",
                "type": "query",
                "description": "Comma-separated list of related properties to expand. Supported values include properties.capacity and properties.addons."
              }
            ]
          },
          "docs": "Retrieves a list of all Power Platform environments for the tenant. The response includes environment properties such as display name, location, SKU type, provisioning state, capacity, linked Dataverse metadata, and runtime endpoints. Requires tenant admin or Power Platform admin permissions."
        },
        {
          "info": {
            "name": "Get Environment",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.powerplatform.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/:environmentId",
            "params": [
              {
                "name": "environmentId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the environment."
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              },
              {
                "name": "$expand",
                "value": "",
                "type": "query",
                "description": "Comma-separated list of related properties to expand."
              }
            ]
          },
          "docs": "Retrieves details for a specific Power Platform environment by its identifier, including properties, capacity, linked Dataverse metadata, and runtime endpoints."
        },
        {
          "info": {
            "name": "Delete Environment",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.powerplatform.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/:environmentId",
            "params": [
              {
                "name": "environmentId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the environment to delete."
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              }
            ]
          },
          "docs": "Deletes a Power Platform environment. This action is irreversible and removes all apps, flows, and data within the environment."
        }
      ]
    },
    {
      "info": {
        "name": "Applications",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get Environment Application Packages",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.powerplatform.com/appmanagement/environments/:environmentId/applicationPackages",
            "params": [
              {
                "name": "environmentId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the target environment."
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              }
            ]
          },
          "docs": "Retrieves the list of application packages available for installation in a specific Power Platform environment. Returns packages with their current installation status, version information, and metadata."
        },
        {
          "info": {
            "name": "Install Application Package",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.powerplatform.com/appmanagement/environments/:environmentId/applicationPackages/:applicationPackageId/install",
            "params": [
              {
                "name": "environmentId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the target environment."
              },
              {
                "name": "applicationPackageId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the application package to install."
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              }
            ]
          },
          "docs": "Initiates the installation of a specific application package in the target Power Platform environment. Returns an operation ID that can be used to poll for installation status."
        },
        {
          "info": {
            "name": "Get Application Package Install Status",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.powerplatform.com/appmanagement/environments/:environmentId/operations/:operationId",
            "params": [
              {
                "name": "environmentId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the target environment."
              },
              {
                "name": "operationId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the installation operation."
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              }
            ]
          },
          "docs": "Retrieves the polling status for a previously triggered application package installation. Use this operation to check whether an install has completed, is still in progress, or has failed."
        },
        {
          "info": {
            "name": "Get Tenant Application Packages",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.powerplatform.com/appmanagement/applicationPackages",
            "params": [
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              }
            ]
          },
          "docs": "Lists the installable application packages available for the tenant. Returns Microsoft-provided application packages that can be deployed to environments."
        }
      ]
    },
    {
      "info": {
        "name": "Flow Runs",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Flow Runs",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.powerplatform.com/powerautomate/environments/:environmentId/flowRuns",
            "params": [
              {
                "name": "environmentId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the environment."
              },
              {
                "name": "workflowId",
                "value": "",
                "type": "query",
                "description": "The workflow ID to retrieve flow runs for."
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              }
            ]
          },
          "docs": "Retrieves flow runs by workflow ID for a specific Power Platform environment. Returns a list of flow run records including their status, start time, end time, and trigger information. The environment must have a Microsoft Dataverse database."
        }
      ]
    },
    {
      "info": {
        "name": "Licensing",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Billing Policies",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.powerplatform.com/licensing/billingPolicies",
            "params": [
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              },
              {
                "name": "$top",
                "value": "",
                "type": "query",
                "description": "The maximum number of billing policies to return."
              }
            ]
          },
          "docs": "Retrieves the list of billing policies configured for the tenant. Billing policies define the association between Azure subscriptions and Power Platform environments for pay-as-you-go billing."
        },
        {
          "info": {
            "name": "Create Billing Policy",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.powerplatform.com/licensing/billingPolicies",
            "params": [
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new billing policy that links a Power Platform environment to an Azure subscription for pay-as-you-go billing."
        },
        {
          "info": {
            "name": "Get Billing Policy",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.powerplatform.com/licensing/billingPolicies/:billingPolicyId",
            "params": [
              {
                "name": "billingPolicyId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the billing policy."
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              }
            ]
          },
          "docs": "Retrieves details for a specific billing policy by its identifier."
        },
        {
          "info": {
            "name": "Update Billing Policy",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.powerplatform.com/licensing/billingPolicies/:billingPolicyId",
            "params": [
              {
                "name": "billingPolicyId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the billing policy to update."
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates an existing billing policy with new values."
        },
        {
          "info": {
            "name": "Delete Billing Policy",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.powerplatform.com/licensing/billingPolicies/:billingPolicyId",
            "params": [
              {
                "name": "billingPolicyId",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the billing policy to delete."
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query",
                "description": "The API version to use for this request."
              }
            ]
          },
          "docs": "Deletes a billing policy by its identifier."
        }
      ]
    }
  ],
  "bundled": true
}