Example 1: Get a certificate

These examples show you how to call POST Certificates/Request to return a certificate in the response.

Example 1: Override 'Certificate API ToDo Timeout' setting to give the CA additional time

Request for Example 1

POST https://tpp.venafi.example/vedsdk/Certificates/Request
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "CADN":"\\ved\\policy\\Self-signed CA",
   "Subject":"test56.domaine.fr",
   "PolicyDN":"\\VED\\Policy\\Certificates",
   "SubjectAltNames":[
      {
         "Type":2,
         "Name":"test30.domaine.fr"
      },
      {
         "Type":2,
         "Name":"test31.domaine.fr"
      }
   ],
   "WorkToDoTimeout":120
}

Response for Example 1

HTTP/1.1 200 OK
{
   "CertificateDN":"\\VED\\Policy\\Certificates\\test56.domaine.fr",
   "CertificateData":"LS0tLS1CJTiBDRVJUSUZJQ0FURS0tLS0tDQpNSUlES...==",
   "Filename":"test56.domaine.fr.cer",
   "Format":"Base64",
   "Guid":"{701bd640-eb13-46c1-ba80-dffbf4d0ead5}"
}

Response when system is busy

HTTP/1.1 202 Accepted
{
   "CertificateDN":"\\VED\\Policy\\Certificates\\test56.domaine.fr",
   "Error":"Certificate processing took longer than WorkToDoTimeout...",
   "Guid":"{701bd640-eb13-46c1-ba80-dffbf4d0ead5}"
}