POST Codesign/GetEnvironment

Returns information about a signing environment. A signing describes the template where values originate and other information for requesting a signing certificate from a CA.

Requirements

  • Permissions:  The caller must be a Code Signing Administrator, or a member of any role on the project that owns the environment.
  • 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

Specify one of the following:

Input parameters

Name

Description

Dn

The Distinguished Name (DN) of the environment. Use the appropriate syntax. For example, in Postman: \\VED\\Code Signing\\Projects\\PrjName\\[YourEnvName].

Guid

The GUID that identifies the certificate environment.

Id

The environment 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:

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: Show a signing environment

Request

POST https://codesign.venafi.example/vedsdk/Codesign/GetEnvironment
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "Dn":"\\VED\\Code Signing\\Projects\\Per User\\User Certificate Environment"
}

Response

HTTP/1.1 200 OK
e
}
{
    "CertificateEnvironment": {
        "AllowUserKeyImport": true,
        "CustomFieldAttributes": {
            "Items": []
        },
        "Dn": "\\VED\\Code Signing\\Projects\\Per User\\User Certificate Environment",
        "Guid": "{1e860edd-da34-469e-9629-b0900cc55c30}",
        "IPAddressRestriction": {
            "Items": []
        },
        "Id": 834089,
        "KeyTimeConstraints": {
            "Items": []
        },
        "KeyUseFlowDN": "\\VED\\Code Signing\\Flows\\No Restrictions",
        "PerUser": true,
        "Status": 1,
        "TemplateDN": "\\VED\\Code Signing\\Environment Templates\\Certificate PerUser",
        "Type": "Code Signing Certificate Environment",
        "CASpecificAttributes": {
            "Items": []
        },
        "CertificateAuthorityDN": {
            "Info": 1,
            "TemplateValues": {
                "Info": 1,
                "Value": {
                    "Items": [
                        "\\VED\\Policy\\Code Signing\\Certificate Authority Templates\\Self-Signed Code Signing CA"
                    ]
                }
            },
            "Value": "\\VED\\Policy\\Code Signing\\Certificate Authority Templates\\Self-Signed Code Signing CA"
        },
        "CertificateSubject": {...},
        "CertificateTemplate": {...},
        "City": {...},
        "KeyAlgorithm": {...},            
        "KeyStorageLocation": {...},
        "Organization":  {...},
        "OrganizationalUnit":  {...},
        "SANEmail":  {...},
        "State":  {...},
        "TargetStore":  {...},
        "country": {...}
    },
    "Result": 1,
    "Success": true
}