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

# Get execution environment usage

> Returns execution-environment usage, daily cost totals, pipeline attribution, and Ravion minutes for the selected billing period.



## OpenAPI

````yaml https://api.ravion.com/openapi.yaml get /execution-environments/{id}/usage
openapi: 3.0.0
info:
  title: Ravion
  version: 0.0.0
servers:
  - url: https://api.ravion.com
security:
  - BearerAuth: []
tags:
  - name: Projects
  - name: Environments
  - name: FeatureFlags
  - name: Pipelines
  - name: PipelineRuns
  - name: TerraformResources
  - name: TerraformExecutionSummaries
  - name: PipelineStepExecutions
  - name: AwsCloudWatch
  - name: PipelineVersions
  - name: Organizations
  - name: Stacks
  - name: StackWorkspaces
  - name: Auth
  - name: OAuth
  - name: User
  - name: Health
  - name: Memberships
  - name: ServiceAccounts
  - name: AwsDefaultNetworks
  - name: AwsAccounts
  - name: ApiKeys
  - name: AwsAmp
  - name: EksPrometheus
  - name: EksLoki
  - name: ExecutionEnvironments
  - name: ModuleDefinitions
  - name: ModuleCategories
  - name: ModuleVersions
  - name: ModuleInstances
  - name: DefaultValueDefinitions
  - name: DefaultValues
  - name: CodeSources
  - name: Github
  - name: GitHub Actions
  - name: Gitlab
  - name: Git
  - name: Values
  - name: Deployments
  - name: DeploymentResources
  - name: InfrastructureEvents
  - name: WebSocket
  - name: Domains
  - name: AcmCertificates
  - name: Describe
  - name: Reports
  - name: BillingPlans
  - name: BillingAccounts
  - name: BillingCycles
  - name: BillingUsageSummaries
  - name: BillingAddOns
  - name: BillingInvoices
  - name: Authorization
paths:
  /execution-environments/{id}/usage:
    get:
      tags:
        - ExecutionEnvironments
      summary: Get execution environment usage
      description: >-
        Returns execution-environment usage, daily cost totals, pipeline
        attribution, and Ravion minutes for the selected billing period.
      operationId: GetExecutionEnvironmentUsage
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: period
          schema:
            enum:
              - CURRENT
              - PREVIOUS
            nullable: true
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    $ref: >-
                      #/components/schemas/ExecutionEnvironment.ExecutionEnvironmentUsage
                required:
                  - data
                type: object
          description: The request has succeeded.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: The request is invalid or malformed.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: You are not authenticated
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: You do not have permission to access this resource.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: The server cannot find the requested resource.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: Server error
components:
  schemas:
    ExecutionEnvironment.ExecutionEnvironmentUsage:
      additionalProperties: false
      properties:
        complete:
          type: boolean
        dataThrough:
          format: date-time
          type: string
        days:
          items:
            $ref: >-
              #/components/schemas/ExecutionEnvironment.ExecutionEnvironmentUsageDayCost
          type: array
        lines:
          items:
            $ref: >-
              #/components/schemas/ExecutionEnvironment.ExecutionEnvironmentUsageLine
          type: array
        period:
          enum:
            - CURRENT
            - PREVIOUS
          type: string
        periodEnd:
          format: date-time
          type: string
        periodStart:
          format: date-time
          type: string
        ravion:
          $ref: >-
            #/components/schemas/ExecutionEnvironment.ExecutionEnvironmentRavionUsage
        startup:
          $ref: >-
            #/components/schemas/ExecutionEnvironment.ExecutionEnvironmentStartupUsage
      required:
        - period
        - periodStart
        - periodEnd
        - complete
        - lines
        - days
        - ravion
      type: object
    Errors.UserFacingErrorData:
      additionalProperties: false
      description: |-
        User-facing error presentation data.
        This is what the API returns to the frontend after formatting ErrorData
        using CEL templates from the error registry.

        Used for both:
        - Error fields on domain models (e.g., PipelineRun.error)
        - API error response bodies (HTTP 4xx/5xx responses)
      properties:
        action:
          allOf:
            - $ref: '#/components/schemas/Errors.Action'
          description: Optional action to help resolve the error
        code:
          description: Full error code, e.g., "Ravion:Pipeline:NOT_FOUND"
          type: string
        description:
          description: Additional description with more details
          type: string
        details:
          description: Structured details rendered as user-facing sections.
          items:
            $ref: '#/components/schemas/Errors.UserFacingErrorDetailSection'
          type: array
        isInternal:
          description: >-
            Indicates whether this error is internal (only set when
            ShowInternal=true).

            This allows SUPERADMINs to identify internal errors while viewing
            full details.
          type: boolean
        message:
          description: Main error message (required)
          type: string
        metadata:
          additionalProperties: {}
          description: >-
            Error params/metadata. Stripped for internal errors unless
            superadmin.
          type: object
        requestId:
          description: Request ID for correlating errors with server logs.
          type: string
      required:
        - code
        - message
      type: object
    ExecutionEnvironment.ExecutionEnvironmentUsageDayCost:
      additionalProperties: false
      properties:
        category:
          $ref: >-
            #/components/schemas/ExecutionEnvironment.ExecutionEnvironmentUsageCategory
        date:
          description: UTC calendar date in YYYY-MM-DD form.
          type: string
        usd:
          format: double
          type: number
      required:
        - date
        - category
        - usd
      type: object
    ExecutionEnvironment.ExecutionEnvironmentUsageLine:
      additionalProperties: false
      properties:
        category:
          $ref: >-
            #/components/schemas/ExecutionEnvironment.ExecutionEnvironmentUsageCategory
        instanceType:
          type: string
        onDemandUsd:
          format: double
          type: number
        pipelineId:
          type: string
        pipelineName:
          type: string
        projectedOnDemandUsd:
          format: double
          type: number
        projectedQuantity:
          format: double
          type: number
        projectedUsd:
          format: double
          type: number
        purchaseOption:
          enum:
            - ON_DEMAND
            - SPOT
            - UNKNOWN
          type: string
        quantity:
          format: double
          type: number
        repository:
          type: string
        stepId:
          type: string
        usd:
          format: double
          type: number
        workflowName:
          type: string
      required:
        - category
        - quantity
        - usd
      type: object
    ExecutionEnvironment.ExecutionEnvironmentRavionUsage:
      additionalProperties: false
      properties:
        grossUsd:
          format: double
          type: number
        includedMinutes:
          format: double
          type: number
        minutes:
          format: double
          type: number
        netUsd:
          format: double
          type: number
        organizationMinutes:
          format: double
          type: number
        projectedGrossUsd:
          format: double
          type: number
        projectedMinutes:
          format: double
          type: number
        projectedNetUsd:
          format: double
          type: number
        ratePerMinuteUsd:
          format: double
          type: number
      required:
        - minutes
        - grossUsd
        - netUsd
        - organizationMinutes
        - includedMinutes
        - ratePerMinuteUsd
      type: object
    ExecutionEnvironment.ExecutionEnvironmentStartupUsage:
      additionalProperties: false
      properties:
        capacityWait:
          allOf:
            - $ref: >-
                #/components/schemas/ExecutionEnvironment.ExecutionEnvironmentStartupDuration
          description: >-
            Only measured starts; historical runs without timing data are
            excluded.
        runnerStart:
          $ref: >-
            #/components/schemas/ExecutionEnvironment.ExecutionEnvironmentStartupDuration
        total:
          $ref: >-
            #/components/schemas/ExecutionEnvironment.ExecutionEnvironmentStartupDuration
      required:
        - capacityWait
        - runnerStart
        - total
      type: object
    Errors.Action:
      additionalProperties: false
      description: Action to help user resolve the error
      properties:
        label:
          description: Button/link label text
          type: string
        url:
          description: URL to navigate to for resolution
          type: string
      required:
        - label
        - url
      type: object
    Errors.UserFacingErrorDetailSection:
      additionalProperties: false
      description: Structured user-facing error detail section.
      properties:
        items:
          description: List of detail values for this section.
          items:
            type: string
          type: array
        object:
          additionalProperties: {}
          description: Structured detail payload for object rendering.
          type: object
        render:
          description: Rendering hint for clients. Valid values are list or object.
          type: string
        title:
          description: Detail section title shown in the UI.
          type: string
      required:
        - title
        - render
      type: object
    ExecutionEnvironment.ExecutionEnvironmentUsageCategory:
      enum:
        - RUNNER_COMPUTE
        - RUNNER_DISK_STORAGE
        - RUNNER_DISK_IOPS
        - RUNNER_DISK_THROUGHPUT
        - HOST_BOOKED
        - HOST_UNBOOKED
        - HOST_IDLE_WARMUP
        - HOST_IDLE_AFTER_STEP
        - HOST_DISK_STORAGE_RUNNING
        - HOST_DISK_STORAGE_PARKED
        - HOST_DISK_IOPS
        - HOST_DISK_THROUGHPUT
        - CHUNK_STORE_STORAGE
        - RAVION_PIPELINE_MINUTES
        - STEP_RUNS
        - HOST_AVAILABLE_VCPU_HOURS
        - HOST_BUSY_VCPU_HOURS
        - HOST_BOOKED_VCPU_HOURS
        - HOST_USED_VCPU_HOURS
        - HOST_AVAILABLE_MEMORY_GIB_HOURS
        - HOST_BUSY_MEMORY_GIB_HOURS
        - HOST_BOOKED_MEMORY_GIB_HOURS
        - HOST_USED_MEMORY_GIB_HOURS
      type: string
    ExecutionEnvironment.ExecutionEnvironmentStartupDuration:
      additionalProperties: false
      properties:
        count:
          format: int32
          type: integer
        medianSeconds:
          format: double
          type: number
        p95Seconds:
          format: double
          type: number
        totalSeconds:
          format: double
          type: number
      required:
        - count
        - totalSeconds
        - medianSeconds
        - p95Seconds
      type: object
  securitySchemes:
    BearerAuth:
      scheme: Bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.