Forum Discussion
check status of the ssl certificate on f5 using rest api
- Sep 29, 2022
forget to add your cert expiry output will be like
curl -sku admin:admin https://bigip_hostname/mgmt/tm/sys/crypto/cert/ | jq '.items[] | {certname: .name, CertExpiry: .apiRawValues.expiration}' { "certname": "/Common/abc_host_certJuly2022", "CertExpiry": "Jul 14 17:11:26 2021 GMT" }
As such there is no direct RestAPI commnd but you can customise based on your requiremnt. Like tmsh there is comamnd to retrive the cert name n cert validity.
tmsh list sys crypto cert
RestAPI you can try something like below.
curl -sku admin:admin https://bigip_hostname/mgmt/tm/sys/crypto/cert/ | jq '.items[] | {certname: .name, CertExpiry: .apiRawValues.expiration}'
Hope it will help you
- SamirSep 29, 2022MVP
forget to add your cert expiry output will be like
curl -sku admin:admin https://bigip_hostname/mgmt/tm/sys/crypto/cert/ | jq '.items[] | {certname: .name, CertExpiry: .apiRawValues.expiration}' { "certname": "/Common/abc_host_certJuly2022", "CertExpiry": "Jul 14 17:11:26 2021 GMT" }
- yunan_harisOct 11, 2022Altocumulus
hi Samir
thank you, it works
- yunan_harisSep 28, 2022Altocumulus
hi Samir
thank you for your reply, actually my customer has ask me about the rest api to detect the certificate expiration using ansible, because of that i need command to check regarding this.
Recent Discussions
Related Content
* 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