> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runalloy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve usage metrics for a workflow

> This endpoint returns the `totalAppActions` (the number of times each block inside the workflow has been executed over the course of the workflow's lifetime), the `totalWorkflowRuns` (which represents the number of times the workflow has been invoked) and the `totalErrors` (the number of times the workflow has had an error).



## OpenAPI

````yaml get /workflows/{workflowId}/analytics
openapi: 3.0.1
info:
  title: Embedded 2025-09
  version: '5.0'
servers:
  - url: https://production.runalloy.com
security: []
paths:
  /workflows/{workflowId}/analytics:
    get:
      summary: Retrieve usage metrics for a workflow
      description: >-
        This endpoint returns the `totalAppActions` (the number of times each
        block inside the workflow has been executed over the course of the
        workflow's lifetime), the `totalWorkflowRuns` (which represents the
        number of times the workflow has been invoked) and the `totalErrors`
        (the number of times the workflow has had an error).
      operationId: get-workflow-analytics
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            default: bearer YOUR_API_KEY
        - $ref: '#/components/parameters/xApiVersion'
        - name: workflowId
          in: path
          description: The Id of the workflow you want to find errors for
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    totalAppActions: 14
                    totalWorkflowRuns: 14
                    totalErrors: 0
              schema:
                type: object
                properties:
                  totalAppActions:
                    type: integer
                    example: 14
                    default: 0
                  totalWorkflowRuns:
                    type: integer
                    example: 14
                    default: 0
                  totalErrors:
                    type: integer
                    example: 0
                    default: 0
      deprecated: false
      security: []
components:
  parameters:
    xApiVersion:
      name: x-api-version
      in: header
      required: true
      description: The version of the API to use. The current API version is **2025-09**.
      schema:
        type: string
        default: 2025-09

````