Skip to content

feat: add create/update/delete commands for template#52

Merged
sawka-harness merged 5 commits into
harness:mainfrom
BlueLabelscotch:feat/template-crud
Jul 14, 2026
Merged

feat: add create/update/delete commands for template#52
sawka-harness merged 5 commits into
harness:mainfrom
BlueLabelscotch:feat/template-crud

Conversation

@BlueLabelscotch

@BlueLabelscotch BlueLabelscotch commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Rounds out the template noun with create/update/delete commands, which previously only supported list/get.

  • create templatePOST /template/api/templates
  • update templatePUT /template/api/templates/update/{id}/{version}
  • delete templateDELETE /template/api/templates/{id}/{version} (version is a required path segment; there's no bare "delete all versions" endpoint)
  • multi_level: true on the template noun, so --level account|org|project works across all five template commands
  • Added a yaml field on the noun (get template now shows the raw template YAML, matching how input_set already does this)
  • Fixed an existing bug in list template: flags.list-type was being parsed as subtraction by the expression evaluator, so templateListType was silently dropped from every request; changed to flags["list-type"]

Testing

Manually tested against a live account:

  • get template <id> --version <v> — confirmed yaml field renders
  • delete template <id> --version <v> — confirmed request path (--debug) hits /templates/{id}/{version}, not the old query-param form
  • list template --level account / --level org — confirmed scope is dropped correctly per level
  • update template — request is well-formed and tested.

@sawka-harness

Copy link
Copy Markdown
Collaborator

Ah the versioning is really interesting here.

We should add a new noun "template_version". So we have "get template" (gets latest), but also "list template_version" and "get template_version" to get specific versions. I guess "create template" creates a whole new template, and "update template" mints a new version. So then we only have "delete template_version".

@mohitsuman
mohitsuman requested a review from sawka-harness July 9, 2026 16:55
@sawka-harness
sawka-harness merged commit fca48aa into harness:main Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants