stella api — Command Guide

Audience: SDK authors, integration engineers, and CI authors who consume Stella Ops OpenAPI specifications. Scope: Listing and downloading service or aggregate OpenAPI specs, with ETag caching and checksum verification.

Overview

The stella api command group retrieves Stella Ops OpenAPI specifications — either the aggregate spec spanning all services or a single service’s spec. Downloads support conditional fetching via ETag and integrity verification via checksum, making them suitable for deterministic client-code generation in CI.

Commands

List API specifications

# List available API specifications
stella api spec list \
  [--tenant <id>] \
  [--json]

Options:

FlagDescription
--tenant / -tTenant context for the operation
--jsonOutput in JSON format

Output:

Download API specification

# Download API specification
stella api spec download \
  --output <path> \
  [--tenant <id>] \
  [--service <name>] \
  [--format openapi-json|openapi-yaml] \
  [--overwrite] \
  [--etag <etag>] \
  [--checksum <checksum>] \
  [--checksum-algorithm sha256|sha384|sha512] \
  [--json]

Options:

FlagDescription
--output / -oOutput path for the downloaded spec (file or directory) (required)
--service / -sService to download spec for (e.g., concelier, scanner, policy). Omit for aggregate spec
--format / -fOutput format: openapi-json (default) or openapi-yaml
--overwriteOverwrite existing file if present
--etagExpected ETag for conditional download (If-None-Match)
--checksumExpected checksum for verification after download
--checksum-algorithmChecksum algorithm: sha256 (default), sha384, sha512

Output:

Exit Codes

CodeMeaning
0Success
1Error or download failure
130Operation cancelled by user

JSON Schema: ApiSpecDownloadResult

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "success": { "type": "boolean" },
    "path": { "type": "string" },
    "sizeBytes": { "type": "integer" },
    "fromCache": { "type": "boolean" },
    "etag": { "type": "string" },
    "checksum": { "type": "string" },
    "checksumAlgorithm": { "type": "string" },
    "checksumVerified": { "type": "boolean" },
    "apiVersion": { "type": "string" },
    "generatedAt": { "type": "string", "format": "date-time" },
    "error": { "type": "string" },
    "errorCode": { "type": "string" }
  }
}

Examples

List available API specifications

# List all specs
stella api spec list

# List specs as JSON
stella api spec list --json

Download aggregate specification

# Download aggregate OpenAPI spec to current directory
stella api spec download --output ./

# Download with checksum verification
stella api spec download \
  --output ./stellaops-api.json \
  --checksum abc123def456... \
  --checksum-algorithm sha256

Download service-specific specification

# Download Scanner API spec
stella api spec download \
  --output ./scanner-api.yaml \
  --service scanner \
  --format openapi-yaml

Conditional download with ETag

# First download captures ETag
stella api spec download --output ./api.json --json > download-result.json

# Subsequent downloads use ETag for cache validation
ETAG=$(jq -r '.etag' download-result.json)
stella api spec download \
  --output ./api.json \
  --etag "$ETAG"

CI/CD Integration

#!/bin/bash
# Download and validate API spec in CI

stella api spec download \
  --output ./openapi.json \
  --checksum "$EXPECTED_CHECKSUM" \
  --json > result.json

if [ "$(jq -r '.checksumVerified' result.json)" != "true" ]; then
  echo "API spec checksum verification failed!"
  exit 1
fi

# Generate client code from spec
npx openapi-generator-cli generate \
  -i ./openapi.json \
  -g typescript-fetch \
  -o ./generated-client

Available Services

ServiceDescription
aggregateCombined specification from all services (default)
concelierVulnerability advisory and VEX management
scannerContainer scanning and SBOM generation
policyPolicy engine and evaluation
authorityAuthentication and authorization
attestorAttestation generation and verification
notifyNotification delivery
schedulerJob scheduling

Best Practices

  1. Use ETag for conditional downloads to minimize bandwidth and improve CI performance
  2. Verify checksums when downloading specs for code generation in production pipelines
  3. Download aggregate spec for general client generation; service-specific specs for targeted APIs
  4. Store ETags in CI cache to enable incremental downloads
  5. Use YAML format for human readability; JSON for programmatic processing