Forum Discussion
sidxzx
Mar 25, 2020Nimbostratus
Get list of all certificates and their correspondantes keys through the REST API (or cli) in BIG-IP
Hello, Is it possible to get all certificates and their correspondantes keys with an api call, i've tried : curl -k -u admin:admin -H "Content-Type: application/json" -X GET https://big-ip/mgm...
Apr 06, 2020
Hello sidxzx.
Something you can do is to execute a BASH command using REST API.
curl -sku admin:<PASSWORD> -H "Content-Type: application/json" -X POST https://<MGMT_IP>/mgmt/tm/util/bash -d "{\"command\":\"run\",\"utilCmdArgs\":\"-c 'cat /config/filestore/files_d/Common_d/certificate_d/:Common:CERT-IDP.crt_40359_1'\"}" | sed 's/\\n/\n/g'
{
"kind":"tm:util:bash:runstate",
"command":"run",
"utilCmdArgs":"-c 'cat /config/filestore/files_d/Common_d/certificate_d/:Common:CERT-IDP.crt_40359_1'",
"commandResult":"
-----BEGIN CERTIFICATE-----
...<CERTIFICATE_FILE>...
-----END CERTIFICATE-----
"}
Usually certificates are located in "/config/filestore/files_d/Common_d/certificate_d/".
KR,
Dario.
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