API Reference

Versions

Download Terraform Files as ZIP

  • API Name: Download Version as ZIP
  • API Route: POST /api/v1/versions/download
  • Request:
    • Body:
json
    {
      "files": {
        "filename.tf": "file content string",
        "...": "..."
      },
      "versionName": "string (required)"
    }
  • What it does: Takes a map of Terraform file names and their contents, packages them into a ZIP archive using JSZip, and returns the ZIP as a downloadable file. The filename is derived from versionName with spaces replaced by hyphens.
  • Returns: A ZIP file download response with:
    • Content-Type: application/zip
    • Content-Disposition: attachment; filename="{versionName}.zip"