Microsoft Power Platform APIs Flow Runs API

Operations for monitoring and retrieving Power Automate flow run history within environments.

Documentation

Specifications

Other Resources

OpenAPI Specification

power-platform-flow-runs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Microsoft Power Platform REST Applications Flow Runs API
  description: Unified RESTful API for Microsoft Power Platform administrative capabilities including environment management, application package management, flow run monitoring, and licensing governance. Provides a single endpoint at api.powerplatform.com for programmatic access to Power Platform resources across tenants and environments.
  version: 2022-03-01-preview
  contact:
    name: Microsoft Power Platform Support
    url: https://admin.powerplatform.microsoft.com/support
  license:
    name: Microsoft API Terms of Use
    url: https://learn.microsoft.com/en-us/legal/microsoft-apis/terms-of-use
servers:
- url: https://api.powerplatform.com
  description: Power Platform Unified API endpoint
- url: https://api.bap.microsoft.com
  description: Business Application Platform (BAP) legacy endpoint for environment management
security:
- oauth2: []
- bearerAuth: []
tags:
- name: Flow Runs
  description: Operations for monitoring and retrieving Power Automate flow run history within environments.
paths:
  /powerautomate/environments/{environmentId}/flowRuns:
    get:
      operationId: listFlowRuns
      summary: List Flow Runs
      description: 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.
      tags:
      - Flow Runs
      parameters:
      - name: environmentId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: The unique identifier of the environment.
      - name: workflowId
        in: query
        required: true
        schema:
          type: string
          format: uuid
        description: The workflow ID to retrieve flow runs for.
      - name: api-version
        in: query
        required: true
        schema:
          type: string
          default: 2022-03-01-preview
        description: The API version to use for this request.
      responses:
        '200':
          description: A list of flow runs matching the workflow ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowRunListResponse'
        '204':
          description: No content. No matching flow runs found.
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found. Environment does not have a Microsoft Dataverse database.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    FlowRun:
      type: object
      description: A record of a Power Automate flow run execution.
      properties:
        name:
          type: string
          description: The unique identifier of the flow run.
          example: Example Title
        id:
          type: string
          description: The fully qualified resource ID of the flow run.
          example: abc123
        type:
          type: string
          description: The resource type.
          examples:
          - Microsoft.ProcessSimple/environments/flows/runs
        properties:
          $ref: '#/components/schemas/FlowRunProperties'
    FlowRunProperties:
      type: object
      description: Properties of a flow run.
      properties:
        startTime:
          type: string
          format: date-time
          description: The timestamp when the flow run started.
          example: '2026-01-15T10:30:00Z'
        endTime:
          type:
          - string
          - 'null'
          format: date-time
          description: The timestamp when the flow run ended. Null if still running.
          example: '2026-01-15T10:30:00Z'
        status:
          type: string
          description: The current status of the flow run.
          enum:
          - Running
          - Succeeded
          - Failed
          - Cancelled
          - Skipped
          - Suspended
          - TimedOut
          - Aborted
          - Waiting
          - Ignored
          - Faulted
          example: Running
        correlation:
          type: object
          description: Correlation information for the flow run.
          properties:
            clientTrackingId:
              type: string
              description: Client-side tracking identifier.
          example: example_value
        trigger:
          type: object
          description: Information about the trigger that initiated the flow run.
          properties:
            name:
              type: string
              description: The name of the trigger.
            startTime:
              type: string
              format: date-time
              description: The timestamp when the trigger fired.
            endTime:
              type: string
              format: date-time
              description: The timestamp when the trigger completed.
            status:
              type: string
              description: The status of the trigger execution.
              enum:
              - Succeeded
              - Failed
              - Skipped
          example: example_value
    FlowRunListResponse:
      type: object
      description: Response containing a list of flow runs.
      properties:
        value:
          type: array
          description: Array of flow run records.
          items:
            $ref: '#/components/schemas/FlowRun'
          example: []
        '@odata.nextLink':
          type:
          - string
          - 'null'
          format: uri
          description: URL to retrieve the next page of results.
          example: https://www.example.com
    ErrorResponse:
      type: object
      description: The standard error response object.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code for the failure type (e.g., BadRequest, NotFound).
            message:
              type: string
              description: A human-readable description of the error.
          example: example_value
  securitySchemes:
    oauth2:
      type: oauth2
      description: Microsoft Entra ID OAuth 2.0 authentication. Register your application and obtain tokens via the Microsoft identity platform.
      flows:
        authorizationCode:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes:
            https://api.powerplatform.com/.default: Access Power Platform API resources
        clientCredentials:
          tokenUrl: https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
          scopes:
            https://api.powerplatform.com/.default: Access Power Platform API resources as a service principal
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token obtained from Microsoft Entra ID OAuth 2.0 flow.