Example 2: Enrollment and Renewal
These examples show you how to call POST Certificates/Request to issue a Certificate Signing Request (CSR).
Example 2A: Supply the certificate during enrollment
The PKCS10 value includes public and private key and omits all line feeds.
Request for Example 2A
POST https://tpp.venafi.example/vedsdk/Certificates/Request
Authorization:Bearer 4MyGeneratedBearerTknz==
{
"PolicyDN":"\\VED\\Policy\\Top Level",
"CADN":"\\VED\\Policy\\CAs\\DigiCert",
"PKCS10":"-----BEGIN CERTIFICATE REQUEST-----\nMIIDJDCCAgwCAQAw...-----END CERTIFICATE REQUEST-----"
}
Response for Example 2A
HTTP/1.1 200 OK
{
"CertificateDN":"\\VED\\Policy\\Top Level\\test04.venafi.com",
"Guid":"{37c04c33-f8f3-498c-bf10-70f346674701}"
}
Example 2B Renew a certificate
This example shows you how to call POST Certificates/Request to renew a certificate.
Request for Example 2B
POST https://tpp.venafi.example/vedsdk/Certificates/Request
Authorization:Bearer 4MyGeneratedBearerTknz==
{
"PolicyDN":"\\VED\\Policy\\Mktg Certificates",
"CADN":"\\VED\\Policy\\CAs\\DigiCert",
"Subject":"www.venafi.com",
"CASpecificAttributes":[
{
"Name":"Validity Period",
"Value":"365"
}
],
"SubjectAltNames":[
{
"TypeName":2,
"Name":"www1.venafi.com"
}
]
}
Response for Example 2B
HTTP/1.1 200 OK
{
"CertificateDN":"\\VED\\Policy\\Mktg Certificates\\www.venafi.com",
"Guid":"{3ce9d114-6855-443e-b203-6404a6f74d3a}"
}