Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Create new Client SSL profile with help of REST API

MukeshK
Nimbostratus
Nimbostratus

How can we create new Client SSL profile with help of REST API. I have been referring this "https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_ltm_profile_client-ssl.html" but would like to see an example.

 

I am trying this with Postman:

 

POST

https://10.1.1.1/mgmt/tm/ltm/profile/client-ssl

 

BODY

{

    "name": "test.abc.com",

    "defaultsFrom": "/Common/clientssl",

    "cert": "/Common/test.abc.com.crt",

    "key": "/Common/test.abc.com.key"

    

}

 

Note: Cert and key are already imported.

Any help will be appreciated.

4 REPLIES 4

MukeshK
Nimbostratus
Nimbostratus

I got the answer, no need to provide .crt or .key extension and neither the /common path

 

{

    "name": "test.abc.com",

    "defaultsFrom": "/Common/clientssl",

    "cert": "test.abc.com",

    "key": "test.abc.com"

}

 

This worked.

Just a hint, you can always append /example to the URL, like this:

GET https://{{big-ip}}/mgmt/tm/ltm/profile/client-ssl/example

You will get... well... examples and explanations.

Hi @Daniel_Wolf :

Can you help me with the POST payload that i can use to simply update the SSL profile with a new set of Cert, Key and Chain ?

I tried the ones in the url you provided but it always throws 400 errors. 

Btw, i am sending the below POST payload

{
"certKeyChain": [
{
"name": "profilename",
"appService": "none",
"cert": "/Common/cert_name.crt",
"certReference": {
"link": "https://localhost/mgmt/tm/sys/file/ssl-cert/~Common~cert_name.crt?ver=15.1.2.1"
},
"chain": "/Common/Globalsign.crt",
"chainReference": {
"link": "https://localhost/mgmt/tm/sys/file/ssl-cert/~Common~Globalsign.crt?ver=15.1.2.1"
},
"key": "/Common/key_name.key",
"keyReference": {
"link": "https://localhost/mgmt/tm/sys/file/ssl-key/~Common~key_name.key?ver=15.1.2.1"
},
"usage": "SERVER"
}
]
}