Venafi (Certificate Management) - Count matching certificates using REST API

by
Jeremy Canfield |
Updated: February 15 2022
| Venafi (Certificate Management) articles
This assumes you have already obtained a Bearer Token using curl. The following curl command can be used to determine if there is a certificate named foo.example.com.
curl
--insecure
--quiet
--head
--request HEAD
--header "Authorization: Bearer abc123"
--header "Content-Type: application/json"
--url https://tpp.example.com/vedsdk/certificates/?name=foo.example.com
Something like this should be returned. Notice that X-Record-Count is 1. This means there is 1 certificate named foo.example.com.
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 0
Server:
Access-Control-Allow-Origin: *
X-Record-Count: 1
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains
Access-Control-Allow-Origin: *
Date: Thu, 17 Jun 2021 11:36:05 GMT
Did you find this article helpful?
If so, consider buying me a coffee over at