Mux · Arazzo Workflow

Mux Account Delivery Usage Audit

Version 1.0.0

Confirm the active environment with whoami, then list per-asset delivery usage for a timeframe to audit billed delivery.

1 workflow 1 source API 1 provider
View Spec View on GitHub Video InfrastructureVideo StreamingLive StreamingVideo AnalyticsVideo AIEncodingArazzoWorkflows

Provider

mux-com

Workflows

account-delivery-usage
Confirm the environment, then list delivery usage for a timeframe.
Reads whoami to confirm the environment, then lists per-asset delivery usage over the supplied timeframe.
2 steps inputs: limit, timeframe outputs: environmentName, organizationName, usage
1
whoami
get-whoami
Read the whoami details to confirm the organization and environment the access token belongs to before pulling usage.
2
listDeliveryUsage
list-delivery-usage
List per-asset delivery usage over the timeframe so billed delivery seconds can be audited.

Source API Descriptions

Arazzo Workflow Specification

mux-com-account-delivery-usage-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Mux Account Delivery Usage Audit
  summary: Confirm the active environment with whoami, then list per-asset delivery usage for a timeframe to audit billed delivery.
  description: >-
    A billing and reporting pattern that grounds a delivery usage pull in the
    correct Mux environment. The workflow reads the whoami details to confirm the
    organization and environment the access token belongs to, then lists per-asset
    delivery usage over a timeframe so billed seconds of delivery can be audited
    against expectations. Every step spells out its request inline so the flow can
    be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: muxApi
  url: ../openapi/mux-openapi.yml
  type: openapi
workflows:
- workflowId: account-delivery-usage
  summary: Confirm the environment, then list delivery usage for a timeframe.
  description: >-
    Reads whoami to confirm the environment, then lists per-asset delivery usage
    over the supplied timeframe.
  inputs:
    type: object
    properties:
      timeframe:
        type: array
        description: Time window for delivery usage as two epoch second timestamps (start, end).
        items:
          type: integer
      limit:
        type: integer
        description: Maximum number of delivery usage rows to return.
        default: 100
  steps:
  - stepId: whoami
    description: >-
      Read the whoami details to confirm the organization and environment the
      access token belongs to before pulling usage.
    operationId: get-whoami
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      environmentName: $response.body#/data/environment_name
      organizationName: $response.body#/data/organization_name
  - stepId: listDeliveryUsage
    description: >-
      List per-asset delivery usage over the timeframe so billed delivery seconds
      can be audited.
    operationId: list-delivery-usage
    parameters:
    - name: timeframe[]
      in: query
      value: $inputs.timeframe
    - name: limit
      in: query
      value: $inputs.limit
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      usage: $response.body#/data
      totalRowCount: $response.body#/total_row_count
  outputs:
    environmentName: $steps.whoami.outputs.environmentName
    organizationName: $steps.whoami.outputs.organizationName
    usage: $steps.listDeliveryUsage.outputs.usage