Skip to content

Example: Searching for expired certificates

You can search for expired certificates that require renewal.

To search for expired certificates

  1. If you have not already done so, obtain an API key.

  2. Use the certificatesearch, certificateinstancesearch, or managedcertificatesearch function and the appropriate JSON body (next step). For example:

    POST https://api.venafi.cloud/v1/certificatesearch
    tppl-api-key: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
    
  3. In the JSON body, specify a relational operator, such as GTE (greater than or equal), and the date time stamp for the value. For additional help, use the parameter descriptions from ´╗┐our screenshotdocumentation. For example:

Example JSON body

{
   "expression":{
      "operands":[
         {
            "field":"validityEnd",
            "operator":"GTE",
            "value":"2018-01-25T17:01:32.000+0000"
         }
      ]
   },
   "ordering":{
      "orders":[
         {
            "direction":"ASC",
            "field":"subjectCN"
         }
      ]
   },
   "paging":{
      "pageNumber":0,
      "pageSize":10
   }
}