# Modify SSL profiles via REST API

**URL:** <https://community.f5.com/t/modify-ssl-profiles-via-rest-api/73228>\
**Category:** Technical Forums\
**Tags:** api, devops\
**Created:** [October 8, 2023, 5:18pm UTC](https://community.f5.com/t/modify-ssl-profiles-via-rest-api/73228 "2023-10-08T17:18:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lnxgeek](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/lnxgeek/32/7442_2.png) [@lnxgeek](https://community.f5.com/u/lnxgeek)\
**Post date:** [October 8, 2023, 5:18pm UTC](https://community.f5.com/t/modify-ssl-profiles-via-rest-api/73228/1 "2023-10-08T17:18:33Z")

</div>

Hi wiz’s

I have been spending some time on automating certificate maintenance.

This has brought my attention to this documentation: [APIRef\_tm\_ltm\_profile\_client-ssl](https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_ltm_profile_client-ssl.html)

In the table descriping “cert”, “chain” and “key” it states in the notes that they are depricated and I should use certKeyChain option instead.

However no matter what I construct of calls which makes changes to an already existing clientssl profile (PATCH and PUT) I’m told:

{“code”:403,“message”:“Operation is not supported on component /ltm/profile/client-ssl.”,“errorStack”:[],“apiError”:1}

Example code:

```bash
curl -sk -H "X-F5-Auth-Token: $TOKEN" -X PATCH https://$f5/mgmt/tm/ltm/profile/client-ssl/ --header 'Content-Type: application/json' --data-raw '{                  
    "name":"sletmig",                                                                             
    "certKeyChain":[{"name":"default","cert":"hest.dk_2023","key":"hest.dk_2023","chain":"My_CA"}]
}'
{"code":403,"message":"Operation is not supported on component /ltm/profile/client-ssl.","errorStack":[],"apiError":1}

```

I can make the change via this syntax:

```bash
curl -sk -H "X-F5-Auth-Token: $TOKEN" -X PATCH https://$f5/mgmt/tm/ltm/profile/client-ssl/~Common~sletmig -H "Content-Type: application/json" -d '{
  "key":"/Common/hest.dk_2023",
  "cert":"/Common/hest.dk_2023",
  "chain":"/Common/My_CA"
  }'|jq

```

Do I read the documentation wrong or am I missing something else?

@JRahm any hints?

---

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [October 9, 2023, 9:17pm UTC](https://community.f5.com/t/modify-ssl-profiles-via-rest-api/73228/2 "2023-10-09T21:17:03Z")

</div>

Hi&nbsp; @lnxgeek &nbsp;that’s correct, you can’t PATCH a collection, just the resources within that collection. From that doc, the methods support are shown one the resource, not the collection:

```tcl
Resource URI
/mgmt/tm/ltm/profile/client-ssl/~resource id
Resource Methods
OPTIONS, GET, PUT, PATCH, DELETE, POST

```

Let me know if I’m misunderstanding the issue. Also, check your DM, I sent you something that might be of interest to you, but I’m equally interested in your test feedback if you have the time to check it out.

---

<div class="post-metadata">

**Author:** ![lnxgeek](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/lnxgeek/32/7442_2.png) [@lnxgeek](https://community.f5.com/u/lnxgeek)\
**Post date:** [October 10, 2023, 5:19am UTC](https://community.f5.com/t/modify-ssl-profiles-via-rest-api/73228/3 "2023-10-10T05:19:55Z")

</div>

Hi @JRahm

In that context it make sense.

But does that mean that my working example (don’t know what to call it 😀) shouldn’t be considered deprecated?

I don’t want to work down a future dead end 😆

---

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [October 10, 2023, 1:50pm UTC](https://community.f5.com/t/modify-ssl-profiles-via-rest-api/73228/4 "2023-10-10T13:50:30Z")

</div>

What version of TMOS are you running? If you’ve tested on 17.1.x and it’s working, it will go away on BIG-IP. That said, the APIs for BIG-IP Next are different and will connect to Central Manager, not the Next instances directly.

---

<div class="post-metadata">

**Author:** ![lnxgeek](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/lnxgeek/32/7442_2.png) [@lnxgeek](https://community.f5.com/u/lnxgeek)\
**Post date:** [October 10, 2023, 2:24pm UTC](https://community.f5.com/t/modify-ssl-profiles-via-rest-api/73228/5 "2023-10-10T14:24:42Z")

</div>

It is 17.1 I’m using.

I guess I have to get started with NEXT in my lab to be ready for the new shiny tool 😆

---

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [October 10, 2023, 2:26pm UTC](https://community.f5.com/t/modify-ssl-profiles-via-rest-api/73228/6 "2023-10-10T14:26:34Z")

</div>

For sure! Labbing it up myself for the last couple of weeks.
