question

TicuIonut-3236 avatar image
0 Votes"
TicuIonut-3236 asked Grmacjon-MSFT commented

Azure Rest Api Create Managed Ssl certificate through code.

Hi,
I am trying to create through the azure rest api a managed ssl certificate.
I am getting 500 internal error.

This is the endpoint i am using https://docs.microsoft.com/en-us/rest/api/appservice/certificates/create-or-update#code-try-0

Question 1. Is this the endpoint used to create a managed ssl certificate?
Question 2. If this is can someone try and share if the end point works?

azure-webapps-ssl-certificates
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @TicuIonut-3236

Do you have any updates for us on this issue?

-Grace

0 Votes 0 ·

1 Answer

Grmacjon-MSFT avatar image
0 Votes"
Grmacjon-MSFT answered

Hi @TicuIonut-3236

Yes, that is the right REST API to create Managed SSL certificate. All you need is to put the canonical and host names in the request body.

PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282?api-version=2019-08-01


 {
    
     "location": "East US",
     "properties": {
         "canonicalName": "My Managed Cert Name",
         "hostNames": [
             "ServerCert"
         ]
     }
        
     }


Hope that helps.

Thanks,
Grace


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.