Forum Discussion
vijay_Kunigal_3
Nimbostratus
Jan 17, 2018Rest API - Device certificate URL
I wanted to retrieve server certificate(path: System--> Device Certificates--> Device Certificate) expiry information via iControl REST API. can some one provide me API url ?
- Satoshi_Toyosa1Ret. Employee
Looks like there is no direct iContrl REST API for Device Certificate (to my knowledge), however, as described in K6353: Updating an SSL device certificate on a BIG-IP system, we can manipulate it in the command line by using the
utility. That means we can do the same via theopenssl
endpoint as below./mgmt/tm/util/bash
curl -sku admin: https:///mgmt/tm/util/bash \ -H "Content-Type: application/json" -X POST \ -d "{\"command\":\"run\", \"utilCmdArgs\": \"-c 'openssl x509 -text -in /config/httpd/conf/ssl.crt/server.crt'\"}" \ | sed 's/\\n/\n/g' | grep "Not After"
Example output:
Not After : Sep 25 01:32:16 2027 GMT
Not elegant, but it does the job. What do you think?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects