IBM Support

How can I query certificate details using DataPower REST Management Interface (RMI)?

Question & Answer


Question

Starting with release 7.5.2, DataPower offers the "do-view-certificate-details" action in "xml-mgmt-ops.xsd" for XML Management Interface (also known as XMI or SOMA).
How can I make such query via RMI?
$ curl -k -u user:pwd --data-binary @viewCert.xml https://example.com:5550/service/mgmt/current

$ cat viewCert.xml
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
	<dp:request xmlns:dp="http://www.datapower.com/schemas/management" domain="myDomain">
		<dp:do-view-certificate-details>
			<dp:certificate-object>myCert</dp:certificate-object>
		</dp:do-view-certificate-details>
	</dp:request>
</soapenv:Body> </soapenv:Envelope>

Answer

Use this to get a list of certificate objects in your domain:

$ curl -k -u user:pwd --request GET https://example.com:5554/mgmt/config/myAppDomain/CryptoCertificate

Then use this to query the certificate of interest's details:

$ curl -k -u user:pwd --data-binary @viewCert.json https://example:5554/mgmt/actionqueue/myAppDomain

$ cat viewCert.json
{
  "ViewCertificateDetails": {
    "CertificateObject": "myCertThing"
  }
}

And also always study these guides:
 
https://www.ibm.com/support/knowledgecenter/SS9H2Y_7.7.0/com.ibm.dp.doc/restmgtinterface.html
 
https://www.ibm.com/developerworks/websphere/library/techarticles/1512_derbakova/1512_Derbakova_P1.html
https://www.ibm.com/developerworks/websphere/library/techarticles/1512_derbakova/1512_Derbakova_P2.html
https://www.ibm.com/developerworks/websphere/library/techarticles/1512_derbakova/1512_Derbakova_P3.html
https://www.ibm.com/developerworks/websphere/library/techarticles/1512_derbakova/1512_Derbakova_P4.html

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS9H2Y","label":"IBM DataPower Gateway"},"Component":"","Platform":[{"code":"PF009","label":"Firmware"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
30 March 2020

UID

ibm16120597