API: Return the total count of certificates via cURL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

API: Return the total count of certificates via cURL

L1 Bithead

Using cURL to dump out all of the certificates in our tenant. A quick test [hyperlink removed] works well, but I realized that the doc [hyperlink removed] doesnt have a call to return the total number of managed certificates so I can adjust the limit query to return the exact number.Is the total buried in another API call somewhere? I poked around the Community and saw mentions about the HTTP headers, but Im not catching a total count in there.Thanks..

 

---------

[Note: The hyperlink previously included in this post is no longer active and has been removed by the Moderators to ensure clarity and accuracy.]

5 REPLIES 5

L3 Networker
Hi @sbirl . Im not aware of a direct way of getting a count. But, if you are trying to get all my suggestion would be to use certificatesearch and page the results until you get them all. It is not recommended to try and get all at once even if you had the count as this will more than likely result in a timeout unless you had a small number of certificates.

L1 Bithead
Thanks Greg, but could you elaborate on certificatesearch? Im not finding that in the API documentation. Is that a specific API call or are you referring to the subject query?

L3 Networker

Its a specific API, just a little bit further down the list 🙂 

 

------

[Note: The hyperlink previously included in this post is no longer active and has been removed by the Moderators to ensure clarity and accuracy.]

L1 Bithead

That method is a bit more complex and I need to look over the schema, so I may come back to it in the future.

 

------

[Note: The hyperlink previously included in this post is no longer active and has been removed by the Moderators to ensure clarity and accuracy.]

L3 Networker

I'm glad you have something that works for you. If you arent adverse to PowerShell, have a look at VenafiPS and specifically Find-VcCertificate. This will automatically page the results and super easy to use.

  • 98 Views
  • 5 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!