Retrieving Output Artifacts (REST API)
Output files (Terraform tfvars, Markdown reports, Kubernetes manifests) generated by the engine can be queried and downloaded.
- GET
/api/outputs/index: Returns a JSON array of available artifacts. Filterable via query parameters:origin_type,origin_name, andtype. - GET
/api/outputs/:resource_type/*name: Renders the artifact inline in the browser. - GET
/api/outputs/:resource_type/*name/download: Forces the artifact to download as an attachment.
For a complete reference on generated outputs via REST see the Output Developer Guide.
Exporting Artifacts to Disk (CLI)
Besides the REST API, every binary can write rendered output artifacts directly to a directory. Only output resources that declare both filename and mimetype properties are exported; files are written in dependency order, and existing files with identical content are skipped (content-hash comparison).
| Binary | Flags | When it writes |
|---|---|---|
rescile-ce save |
--outputs[=<DIR>], --output-filter <PATTERN> |
once after the build |
rescile-ee save |
--outputs[=<DIR>], --output-filter <PATTERN> |
once after the build |
rescile-ce serve / rescile-ee serve |
--write-outputs[=<DIR>], --write-outputs-filter <PATTERN> |
after the initial build; with --watch, also after every reactive rebuild |
rescile-importer |
--outputs[=<DIR>], --output-filter <PATTERN> |
after the build (and every rebuild in --watch mode) |
rescile-controller |
--write-outputs[=<DIR>], --write-outputs-filter <PATTERN> |
whenever a new artifact bundle is loaded; rendered content comes from the prebuilt graph inside the bundle |
Without a value, --outputs / --write-outputs export to the current working directory. Reactive re-export on serve requires --watch; without it, the initial-build export is the only write.
Filter patterns
--output-filter and --write-outputs-filter may be repeated and match against the rendered filename property:
- Literal patterns (no
*,?,[) match as substrings, grep-style:--output-filter tfvarsselects every filename containingtfvars. - Glob patterns (containing
*,?, or[) match the full filename with shell pathname-expansion semantics:*and?stay within a path component,**as a whole path segment crosses/.'terraform/**/*.tf'selects all Terraform files underterraform/;'*.md'selects only top-level Markdown files.
Invalid glob patterns are rejected before the build runs.
# CI: build graph, write every rendered artifact
rescile-importer -d data --output-file graph.json --outputs ./dist
# CI: only Terraform artifacts
rescile-importer -d data --output-file graph.json --outputs ./dist \
--output-filter 'terraform/**/*.tf'
# Service: sync skill files after the initial build and on every watch rebuild
rescile-ee serve -d data --watch --write-outputs /srv/rescile/outputs --write-outputs-filter '**/*.md'
# Standalone controller: unpack a prebuilt bundle and write its artifacts
rescile-controller --artifact-url bundle.tar.gz --write-outputs ./dist
See CLI Reference for the complete flag list.