Skip to content

Revisit YAML and JSON output for <asset> list commands to act as export #67

@mmanciop

Description

@mmanciop

Problem

The <asset> list -o yaml and <asset> list -o json commands output the raw API list-item summaries (id, dataset, name, origin) instead of the full asset definitions.
This makes the output unsuitable for backup, version control, or re-applying with dash0 apply -f -.

For example, dash0 dashboards list -o yaml used to produce:

- dataset: default
  id: a1b2c3d4-...
  name: My Dashboard

This is not a valid dashboard definition and cannot be used with dash0 apply.

Expected behavior

  • <asset> list -o yaml outputs full asset definitions as a multi-document YAML stream (separated by ---), directly pipeable to dash0 apply -f -.
  • <asset> list -o json outputs an array of full asset definitions.
  • The output should be equivalent to calling <asset> get <id> -o yaml for each asset individually.
  • This applies to all four asset types: dashboards, check-rules, views, and synthetic-checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions