• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

astronomer / astro-cli / 9179bec0-e225-4e79-b8df-febc004cee17
35%
main: 33%

Build:
Build:
LAST BUILD BRANCH: fix/1974
DEFAULT BRANCH: main
Ran 05 Feb 2026 09:32PM UTC
Jobs 1
Files 184
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Feb 2026 09:27PM UTC coverage: 34.998% (+1.8%) from 33.15%
9179bec0-e225-4e79-b8df-febc004cee17

Pull #2006

circleci

jeremybeard
Add `astro api` command for authenticated Airflow and Cloud API requests

Introduce the `astro api` top-level command with two subcommands:

  astro api airflow — make requests to the Airflow REST API (local or
  deployed), with automatic version detection (2.x, 3.0.x, 3.0.3+) and
  OpenAPI spec resolution.

  astro api cloud — make requests to the Astro Cloud platform API using
  the current context's bearer token.

Both subcommands support:
  - Endpoint discovery via `ls` and `describe` (parsed from OpenAPI specs)
  - Calling endpoints by operation ID or raw path
  - Pagination (per-page streaming or --slurp into a single array)
  - Response caching with TTL and automatic stale-entry cleanup
  - jq filters and Go-template output formatting
  - Colored JSON output
  - --curl flag to emit equivalent curl commands
  - Magic field syntax for request bodies (@file, :=json, =string)
  - Custom headers and path-parameter overrides

Supporting packages:
  - pkg/openapi: OpenAPI spec fetching, caching, endpoint indexing,
    Airflow version-range mapping, and schema introspection.

Includes unit tests for request handling, output formatting, field
parsing, OpenAPI version mapping, endpoint indexing, and caching.
Pull Request #2006: Add `astro api` command

1998 of 2386 new or added lines in 13 files covered. (83.74%)

22863 of 65327 relevant lines covered (35.0%)

8.42 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
97.56
pkg/openapi/schema.go
2
93.1
pkg/openapi/airflow_versions.go
5
96.0
pkg/openapi/endpoints.go
6
96.0
cmd/api/list.go
10
93.38
cmd/api/fields.go
10
91.94
cmd/api/output.go
14
90.6
pkg/openapi/cache.go
22
94.09
cmd/api/describe.go
33
0.0
cmd/api/api.go
56
88.21
cmd/api/request.go
80
68.75
cmd/api/cloud.go
149
68.96
cmd/api/airflow.go
Jobs
ID Job ID Ran Files Coverage
1 9179bec0-e225-4e79-b8df-febc004cee17.1 05 Feb 2026 09:32PM UTC 184
35.0
Source Files on build 9179bec0-e225-4e79-b8df-febc004cee17
  • Tree
  • List 184
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • CircleCI Build #9179BEC0...
  • Pull Request #2006
  • PR Base - main (#63595748...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc