Skip to main content

Partially update a template, re-approving on file replacement

PATCH 

/templates/:id/single-step

Updates one or more attributes (name, description, type, file) of an existing template. At least one must be provided; supplying none causes a 400.

When to use: Use this to rename a template, change its description or type, or replace its mappings CSV without going through the full create flow. For confirming column mappings in the legacy two-step flow use PUT /templates/{id} instead.

How: Send a multipart/form-data request with the required tenant-id header, {id} identifying an existing template for the tenant (404 otherwise), and any subset of the updatable fields. If file is supplied it must have a .csv extension and every mapping row must carry a mapped attribute (400 otherwise). A type of GROUP requires the tenant's supportGroupRosters configuration.

Returns: A SingleStepTemplateFlowResponse, with side effects depending on the branch taken. With file: the template's existing column records are deleted, new template.csv/mappings.csv objects are uploaded to GCS, new column records are created, schema.json is regenerated, and the resulting status (success, or failure if schema generation failed) is persisted and returned with the refreshed fields. Without file: only the metadata changes; the stored columns, artifacts, and status are preserved, and the response echoes the existing fields and status with the stored artifact object paths.

Request​

Responses​

The updated template's resolved column mappings, status, and artifact object paths.