POST Codesign/GetTemplate

Returns information about a CodeSign Protect Environment Template.

Requirements

  • Permissions:  None. Anyone can view templates. However, some templates may have limited visibility.
  • Token scope:  Codesign

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

One of the following parameters. To any of these values, call POST Codesign/EnumerateTemplates.

Input parameters

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].

Guid

The GUID that uniquely identifies the Environment template.

Id

The Environment Template identifier.

Returns

Response description

Name

Description

HTTP 200

For valid requests, this call returns a HTTP 200 message and the following data in the message body:

  • CertificateTemplate: The Certificate environment template.
  • Error: Appears only when Success is false. An error message that accompanies the Result. Check your payload input values.

  • Result: The Result code of this API call. For more information, see Sign Result Codes.

  • Success: The result of this API call: A value of false indicates the request failed due to an Error. Otherwise, true.

HTTP 400

For invalid requests, this call returns HTTP 400 Bad Request and the following data in the message body:

  • error: The reason for the error.
  • error_description: If available, additional information about how to retry the request.

Example: List the CA and certificate settings from a Certificate Template

Request

POST https://codesign.venafi.example/vedsdk/Codesign/GetTemplate
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "Guid":"{4d6ed677-a001-4f42-a12f-f2bf47b32e7a}"
}

Response

HTTP/1.1 200 OK
{
   "CertificateTemplate":{
      "AllowUserKeyImport": true,
      "Dn":"\\VED\\Code Signing\\Environment Templates\\Development",
      "Guid":"{4d6ed677-a001-4f42-a12f-f2bf47b32e7a}",
      "Id":365,
      "ObjectNamingPattern": "$Sign.Project$\\$Sign.Environment$\\$Identity[$Sign.User$]$",
      "PerUser": true,
      "KeyStorageLocation":{
         "Info":1,
         "Value":{
            "Items":[

            ]
         }
      },
      "KeyUseFlowDN":"\\VED\\Code Signing\\Flows\\No Restrictions",
      "Type":"Code Signing Certificate Environment Template",
      "VisibleTo":{
         "Items":[

         ]
      },
      "CertificateAuthorityDN":{
         "Info":1,
         "Value":{
            "Items":[
               "\\VED\\Policy\\Code Signing\\Certificate Authority Templates\\Self-Signed Code Signing CA"
            ]
         }
      },
      "City":{
         "Info":1,
         "Value":{
            "Items":[

            ]
         }
      },
      "Country":{
         "Info":1,
         "Value":{
            "Items":[

            ]
         }
      },
      "KeyAlgorithm":{
         "Info":1,
         "Value":{
            "Items":[
               "RSA2048"
            ]
         }
      },
      "Organization":{
         "Info":1,
         "Value":{
            "Items":[

            ]
         }
      },
      "OrganizationalUnit":{
         "Info":1,
         "Value":{
            "Items":[

            ]
         }
      },
      "SANEmail":{
         "Info":1,
         "Value":{
            "Items":[

            ]
         }
      },
      "State":{
         "Info":1,
         "Value":{
            "Items":[

            ]
         }
      },
      "TargetPolicyDN":"\\VED\\Policy\\Code Signing\\Certificates"
   },
   "Result":1,
   "Success":true
}