NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Rest API Discussions

Setting server_enabled to true after installing SSL certificate from REST API (ONTAP 15)

aaa1
3,758 Views

I am automating SSL renewal procedure.

 

I have managed to install the certificate, but after installation I would like to enable it (usually done in CLI in the security ssl cmddir by parsing the -server-enabled true argument) to take over from the certificate currently enabled.

 

These are the endpoints present in the /api/docs:

GET ​/security​/certificates

POST ​/security​/certificates

GET ​/security​/certificates​/{uuid}

DELETE ​/security​/certificates​/{uuid}

 

Can someone help navigating me further to accomplish this? I have without success tried in two different ways to update by trying the PATCH method, although not present in documentation, as well as looking through the docs of svm endpoints.

1 ACCEPTED SOLUTION

noor_buchi
3,557 Views

Hello Anders,

 

To update the web services security configuration and set a certificate for an SVM, the /api/svm/svms/{svm.uuid}/web endpoint should be used.

Please refer to the official REST API documentation for more information on this endpoint: https://docs.netapp.com/us-en/ontap-restapi/ontap/svm_svms_svm.uuid_web_endpoint_overview.html#updating-the-web-services-security-configuration

 

As for the Python Client Library, the WebSvm object can be used. For more information, refer to the official library documentation here: https://library.netapp.com/ecmdocs/ECMLP3331665/html/resources/web_svm.html

 

I hope this is helpful.

 

Best,

Noor Buchi

View solution in original post

5 REPLIES 5

AmitKerkar
3,681 Views

does this work

/security/certificates/{uuid}/enable ?

aaa1
3,677 Views

Thanks for the response. 

 

With POST, PATCH  or? I do not have this endpoint in the documentation. Can I ask you where you found this?

aaa1
3,677 Views

I tried with multiple HTTP methods and get error "Unexpected argument: "enable"

noor_buchi
3,558 Views

Hello Anders,

 

To update the web services security configuration and set a certificate for an SVM, the /api/svm/svms/{svm.uuid}/web endpoint should be used.

Please refer to the official REST API documentation for more information on this endpoint: https://docs.netapp.com/us-en/ontap-restapi/ontap/svm_svms_svm.uuid_web_endpoint_overview.html#updating-the-web-services-security-configuration

 

As for the Python Client Library, the WebSvm object can be used. For more information, refer to the official library documentation here: https://library.netapp.com/ecmdocs/ECMLP3331665/html/resources/web_svm.html

 

I hope this is helpful.

 

Best,

Noor Buchi

EdwardNedHarvey
2,524 Views

I am also working to automate SSL renewal. Did you get this working? Could you share your code?

Public