cancel
Showing results for 
Search instead for 
Did you mean: 

Update certificate of SSL profile via REST API

qbolbk59
Nimbostratus
Nimbostratus

Hi All,

Is there a way to update the exisiting certificate binded in the SSL profile of F5 ? I have installed the certificate already but not really sure how to add that cert to the SSL profile using iControl REST API. 

 

I tried sending the request as shown below, but it always throws error 400. 

URL: https://hostname/mgmt/tm/ltm/profile/client-ssl/profile_name?ver=15.1.2.1

POST Body:

 

 

 

{
	"cert": "/Common/cert_name.crt",
	"chain": "/Common/ca_package.crt",
	"key": "/Common/key_name.key"
}

 

The error i am getting is:

{
    "code": 400,
    "message": "one or more configuration identifiers must be provided",
    "errorStack": [],
    "apiError": 26214401
}

 

1 ACCEPTED SOLUTION

Sebastiansierra
Cirrocumulus
Cirrocumulus

Hi,

I think you have to fix a couple of parameters to correct your script:

1. You need to use the method Patch to edit the current profile.

2.The correct URL to edit the profile is /mgmt/tm/ltm/profile/client-ssl/~Common~pofile_name?ver=15.1.3.1

3. The body is correct.

View solution in original post

3 REPLIES 3

Sebastiansierra
Cirrocumulus
Cirrocumulus

Hi,

I think you have to fix a couple of parameters to correct your script:

1. You need to use the method Patch to edit the current profile.

2.The correct URL to edit the profile is /mgmt/tm/ltm/profile/client-ssl/~Common~pofile_name?ver=15.1.3.1

3. The body is correct.

@Sebastiansierra   Ah.. rookie mistake with the URL. Thanks for pointing it out ! 😝

Sebastiansierra
Cirrocumulus
Cirrocumulus

Sebastiansierra_0-1645447629859.png