Vantage · Arazzo Workflow

Vantage Create a Cost Report and Fetch Its Costs

Version 1.0.0

Create a Cost Report from a VQL filter and immediately retrieve its cost data.

1 workflow 1 source API 1 provider
View Spec View on GitHub BudgetsCloud PricingCost ManagementCostsFinOpsArazzoWorkflows

Provider

vantage

Workflows

create-cost-report-and-fetch-costs
Create a Cost Report and retrieve its cost line items.
Creates a Cost Report in the supplied workspace, fetches it back by token, and retrieves the cost data for the requested date range.
3 steps inputs: apiToken, endDate, filter, groupings, startDate, title, workspaceToken outputs: costReportToken, costs
1
createReport
createCostReport
Create a new Cost Report scoped by the supplied VQL filter, groupings, and workspace.
2
getReport
getCostReport
Read the newly created Cost Report back by token to confirm it persisted.
3
getCosts
getCosts
Retrieve the cost line items for the report over the requested date range.

Source API Descriptions

Arazzo Workflow Specification

vantage-create-cost-report-and-fetch-costs-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Vantage Create a Cost Report and Fetch Its Costs
  summary: Create a Cost Report from a VQL filter and immediately retrieve its cost data.
  description: >-
    The foundational Vantage cost analysis pattern. The workflow creates a new
    Cost Report scoped by a VQL filter and groupings, reads the report back to
    confirm it persisted, and then pulls the underlying cost line items for a
    date range. Every step spells out its request inline — including the Bearer
    token — so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: costManagementApi
  url: ../openapi/vantage-cost-management-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-cost-report-and-fetch-costs
  summary: Create a Cost Report and retrieve its cost line items.
  description: >-
    Creates a Cost Report in the supplied workspace, fetches it back by token,
    and retrieves the cost data for the requested date range.
  inputs:
    type: object
    required:
    - apiToken
    - title
    - filter
    - workspaceToken
    properties:
      apiToken:
        type: string
        description: Vantage API token used as the Bearer credential.
      title:
        type: string
        description: Human-readable title for the new Cost Report.
      filter:
        type: string
        description: A VQL filter expression scoping the Cost Report.
      groupings:
        type: string
        description: Comma-separated list of groupings for the Cost Report.
      workspaceToken:
        type: string
        description: The workspace token the Cost Report belongs to.
      startDate:
        type: string
        description: Start date for the cost data (YYYY-MM-DD).
      endDate:
        type: string
        description: End date for the cost data (YYYY-MM-DD).
  steps:
  - stepId: createReport
    description: >-
      Create a new Cost Report scoped by the supplied VQL filter, groupings, and
      workspace.
    operationId: createCostReport
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiToken
    requestBody:
      contentType: application/json
      payload:
        title: $inputs.title
        filter: $inputs.filter
        groupings: $inputs.groupings
        workspace_token: $inputs.workspaceToken
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      costReportToken: $response.body#/token
  - stepId: getReport
    description: Read the newly created Cost Report back by token to confirm it persisted.
    operationId: getCostReport
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiToken
    - name: cost_report_token
      in: path
      value: $steps.createReport.outputs.costReportToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      title: $response.body#/title
      filter: $response.body#/filter
  - stepId: getCosts
    description: >-
      Retrieve the cost line items for the report over the requested date range.
    operationId: getCosts
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiToken
    - name: cost_report_token
      in: query
      value: $steps.createReport.outputs.costReportToken
    - name: start_date
      in: query
      value: $inputs.startDate
    - name: end_date
      in: query
      value: $inputs.endDate
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      costs: $response.body#/costs
  outputs:
    costReportToken: $steps.createReport.outputs.costReportToken
    costs: $steps.getCosts.outputs.costs