Docs
Live demo
PATCH/api/v2/access-templates/{name}
access:manageAPI token

Rename an access template. Only the name people see changes: the key in the path, every version, the rules of the template and what Principal created on targets stay as they are, so nothing needs an apply. The new name is shown to every organization of the installation, like any other change of a template.

Changes display_name only (name stays fixed, no new version or apply, 409 on collision).

Parameters

Path1 required of 1
namestringpathrequired

Access template name

Request body application/json · RenameAccessTemplateRequest

New name of the template

Required1 of 1 fields
display_namestringrequired

New name people see, 1 to 255 characters after trimming spaces.

example "BI analysts read-only"

Responses

200

OK

AccessTemplateResponse · 12 fields
bodymap of string → any
created_atstring
default_ttlstring

TTL the rule wizard offers for this template, an ISO 8601 duration.

descriptionstring
enginestring
namestring

Key of the template. Rules, versions and every /access-templates/{name} path refer to the template by it, and a rename never changes it.

display_namestring

Name people see, the same for every version. Equals name until someone renames the template with PATCH /access-templates/{name}.

max_ttlstring

Longest TTL a rule of this template may ask for (L-14), an ISO 8601 duration.

rule_countinteger

How many rules of the caller organization use the template, any version, counted the way a refused delete counts them. Present only in GET, PUT and PATCH /access-templates/{name}.

min 0
future_objects_named_rowFutureObjectsNamedRowResponse

The first row of a PostgreSQL rule or template that names its objects by name or by a name mask while Future objects are on. Future objects reach only a row on every object of its kind in a schema, so the switch reaches none of these objects. Only a rule or template saved before Principal refused such a save carries it, and its next save is refused until Future objects are off or the row covers every object of its kind. A rule carries it in every read. A template only in GET /access-templates/{name} and the version read.

4 fields
objectsstringrequired

The kind of objects of the row, in the plural.

tablessequencesfunctionstypesobjects
databasestring

The database the row names. Absent when the row names none, and always for a template.

schemastring

The schema the row names. Absent when the row names none.

namestringrequired

The object name or name mask of the row.

updated_atstring
versioninteger
400

Bad Request - the name is empty or longer than 255 characters. Field_errors names display_name

409

Another template already uses the name as its name or its key (code resource.conflict, field_errors names display_name)

Common errors: 401 403 404 413 429 503 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close