Import and inspect collections
Bring a specification into a collection, then verify the resulting endpoint list before building a contract or MCP server.
These examples use elva-cli 1.2.0 or later. Run elva --version to check your installed version.
Import a specification
elva import spec openapi.yaml --dry-run
elva import spec openapi.yaml --name "Orders API"
elva import spec --url https://api.example.com/openapi.yaml
cat openapi.yaml | elva import spec - --name "Orders API copy"
Choose one source form. Files must be JSON or YAML and no larger than 10 MB. A local-file dry run validates locally without creating a collection; a URL dry run still fetches through Elva. URL sources must be reachable by the hosted service. Importing normally creates a new collection.
Inspect, then replace a spec
elva collection list
elva collection show "Orders API"
elva collection endpoints "Orders API" --method get
elva --collection "Orders API" import spec openapi.yaml --update
The --update option replaces the selected collection's spec and retains the previous spec as a restorable version. collection endpoints accepts repeatable --method, --tag, and --path filters (--path matches a path prefix). Review the endpoint count after any import. A stored document can still yield zero endpoints; a successful command alone is not an endpoint-coverage check.
Import from Postman
elva import postman "Orders API"
Use the Postman command with the collection's exact name or ID, or run elva import postman --list to see the collections your key can access. The key is never taken from the command line: enter it when prompted, set ELVA_POSTMAN_API_KEY, or pass it on stdin with --key-stdin. To import an exported Postman collection file instead, use elva import spec; the format is detected automatically, or set it with --format postman. If import fails, check file format, size, URL reachability, duplicate names, and access to the selected workspace.
On this page
- Import and inspect collections