Xpath configuration Example, based on How to list Expiring Certificates tech doc policy example
Release : 10.x
Component : API GATEWAY
1. copy the Trusted certificate List (in XML format ) obtained when using the line #13 of your policy from the browser
use the URL from line 13 and paste it in your browser ,
https://gateway.domain.com:8443/restman/1.0/trustedCertificates
Note: copy just the XML text, do not copy the first line "This XML file does.." or you will produce an error due the format does not accomplish XML document
2. From Evaluate Response XPath assertion , click on Add button to create a New Sample Message
3. Add a Name to the sample Message and Paste the copied XML text from Browser into the XML Document Section, just over-writing the second line <empty/>
4. click OK
5. you will see now something like this.
6. To create the filter on the Xpath, select the attribute from the XML document Section, as example : SubjectName
and the assertion will complete automatically the syntax needed under Xpath section , with this syntax :
/l7:List/l7:Item/l7:Resource/l7:TrustedCertificate/l7:CertificateData/l7:SubjectName
7. this is the way to create new sample message and create a new filter for xpath different/same as the example do you will use on the policy.
8. the next steps are test and see how it works and what do you need to add or modify to obtain the expected results .
1. Prerequisites , need to be Enabled the Restman Management Service on Gateway :
Tasks-> Services and APIS -> Publish Internal Service -> Select Service to Publish
2. The Example shows on this KB is based on the Policy Sample used in "Monitor expiring trusted certificate with schedule task on API Gateway"
https://knowledge.broadcom.com/external/article?articleId=194152