v54

latestSwagger 2.0AGPL-3.0raw.githubusercontent.com2026-08-03397565628.8 KB
Enterprise

Update template ACL

patch/api/v2/templates/{template}/acl

Path parameters

templatestring uuid required

Template ID

Request body

group_permsobject

GroupPerms is a mapping from valid group UUIDs to the template role they should be granted. To remove a group from the template, use "" as the role (available as a constant named codersdk.TemplateRoleDeleted)

user_permsobject

UserPerms is a mapping from valid user UUIDs to the template role they should be granted. To remove a user from the template, use "" as the role (available as a constant named codersdk.TemplateRoleDeleted)

Example request

{
  "group_perms": {
    "8bd26b20-f3e8-48be-a903-46bb920cf671": "use",
    "<group_id>": "admin"
  },
  "user_perms": {
    "4df59e74-c027-470b-ab4d-cbba8963a5e9": "use",
    "<user_id>": "admin"
  }
}

Response

OK

detailstring

Detail is a debug message that provides further insight into why the action failed. This information can be technical and a regular golang err.Error() text.

  • "database: too many open connections"
  • "stat: too many open files"
messagestring

Message is an actionable message that depicts actions the request took. These messages should be fully formed sentences with proper punctuation. Examples:

  • "A user has been created."
  • "Failed to create a user."