POST Codesign/UpdateTemplate
Updates or applies CodeSign Protect Environment Template settings. The changes apply to all project environments that use this template.
Requirements
- The template PerUser attribute is already set to true. To set the value, call POST Codesign/CreateTemplate.
- Permissions: The caller must be a Code Signing Administrator.
- Token scope: Codesign:Manage
Headers
-
Content type: Content-Type:application/json.
- Token: The bearer access token that you received. For example, Authorization:Bearer 4MyGeneratedBearerTknz==. For more information, see Passing a bearer token in your API calls.
Parameters
Name |
Description |
---|---|
Name |
Description |
Dn |
The Distinguished Name (DN) of the environment template. Use the appropriate syntax. For example, in Postman: \\VED\\Code Signing\\Environment Templates\\[YourTemplateName]. To get this value, call POST Codesign/EnumerateTemplates. |
CertificateTemplate |
Pass one of the following objects with the changes the changes you want:
|
ObjectNamingPattern |
Only valid if the template PerUser attribute is already set to true. The pattern that stores signing Certificate objects in the Policy Tree by a user's identity. Each signer has a unique Policy folder. The default is $Sign.Project$\$Sign.Environment$\$Sign.User$.
Example: ObjectNamingPattern: $Sign.Environment$\\$Sign.Project$\\$Identity[$Sign.User$]$ stores certificates in \VED\Policy\Code Signing\Certificates\[ProjectEnvThatUsesThisTemplate]\[Environment]\[user]. |
Returns
Name |
Description |
---|---|
Name |
Description |
HTTP 200 |
For valid requests, this call returns a HTTP 200 message and the following data in the message body:
|
HTTP 400 |
For invalid requests, this call returns HTTP 400 Bad Request and the following data in the message body:
|
Example: Apply macros to the template for object naming
Request
POST https://codesign.venafi.example/vedsdk/Codesign/UpdateTemplate Authorization:Bearer 4MyGeneratedBearerTknz==
{ "Dn":"\\VED\\Code Signing\\Environment Templates\\MyTemplate2", "ObjectNamingPattern":"$Sign.Project$\\$Sign.Environment$\\$Identity[$Sign.User$]$", "CertificateTemplate":{ "Dn":"\\VED\\Code Signing\\Environment Templates\\MyTemplate2", ... } }
Response
HTTP/1.1 200 OK { "Result": 1, "Success": true }