SALES: 1-800-867-1380

Add SSL Certificates to a Webspace

Updated: January 15, 2014

You can add SSL certificates to a webspace by using a POST request that includes the certificate information in the request body.

Replace <Subscription-Id> with your subscription ID and <WebSpaceName> with the webspace name that you will use. For a list of webspace names, see Quick Reference - Web Sites Management REST API.

 

Method Request URI HTTP Version

POST

https://management.core.windows.net/<Subscription-Id>/services/webspaces/<WebSpaceName>/certificates

HTTP/1.1

The following table describes required and optional request headers.

 

Request Header Description

x-ms-version

Optional. Specifies the version of the operation to use for this request. If you do not specify a version, the latest version is used. For more information about versioning headers, see API Versioning on the Azure Websites Management REST API Reference page.

Content-Length

Required.

Content-Type: application/json; charset=utf-8

Required if the request body is sent in JSON format.

accept: application/json

Optional. Use this header to receive the response in JSON format.

The following is an example JSON request body:


[{
   "CerBlob":[81,
   109,
   70,
   122,
   90,
   83,
   65,
   50,
   78,
   67,
   66,
   84,
   100,
   72,
   74,
   108,
   89,
   87,
   48,
   61],
   "ExpirationDate":"\/Date(928149600000+0000)\/",
   "FriendlyName":"String content",
   "HostNames":["String content"],
   "IssueDate":"\/Date(928149600000+0000)\/",
   "Issuer":"String content",
   "Password":"String content",
   "PfxBlob":[81,
   109,
   70,
   122,
   90,
   83,
   65,
   50,
   78,
   67,
   66,
   84,
   100,
   72,
   74,
   108,
   89,
   87,
   48,
   61],
   "PublicKeyHash":"String content",
   "SelfLink":"http:\/\/www.contoso.com\/",
   "SiteName":"String content",
   "SubjectName":"String content",
   "Thumbprint":"String content",
   "ToDelete":true,
   "Valid":true
}]

The following is an example XML request body:

<Certificates xmlns="http://schemas.microsoft.com/windowsazure">
  <Certificate>
    <CerBlob>QmFzZSA2NCBTdHJlYW0=</CerBlob>
    <ExpirationDate>1999-05-31T11:20:00</ExpirationDate>
    <FriendlyName>String content</FriendlyName>
    <HostNames>
      <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">String content</string>
      <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">String content</string>
    </HostNames>
    <IssueDate>1999-05-31T11:20:00</IssueDate>
    <Issuer>String content</Issuer>
    <Password>String content</Password>
    <PfxBlob>QmFzZSA2NCBTdHJlYW0=</PfxBlob>
    <PublicKeyHash>String content</PublicKeyHash>
    <SelfLink>http://www.contoso.com/</SelfLink>
    <SiteName>String content</SiteName>
    <SubjectName>String content</SubjectName>
    <Thumbprint>String content</Thumbprint>
    <ToDelete>true</ToDelete>
    <Valid>true</Valid>
  </Certificate>
  <Certificate>
    <CerBlob>QmFzZSA2NCBTdHJlYW0=</CerBlob>
    <ExpirationDate>1999-05-31T11:20:00</ExpirationDate>
    <FriendlyName>String content</FriendlyName>
    <HostNames>
      <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">String content</string>
      <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">String content</string>
    </HostNames>
    <IssueDate>1999-05-31T11:20:00</IssueDate>
    <Issuer>String content</Issuer>
    <Password>String content</Password>
    <PfxBlob>QmFzZSA2NCBTdHJlYW0=</PfxBlob>
    <PublicKeyHash>String content</PublicKeyHash>
    <SelfLink>http://www.contoso.com/</SelfLink>
    <SiteName>String content</SiteName>
    <SubjectName>String content</SubjectName>
    <Thumbprint>String content</Thumbprint>
    <ToDelete>true</ToDelete>
    <Valid>true</Valid>
  </Certificate>
</Certificates>

The response includes an HTTP status code, a set of response headers, and a response body.

A successful operation returns status code 200 (OK).

For information about status codes, see Service Management Status and Error Codes.

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

 

Response Header Description

x-ms-request-id

A value that uniquely identifies the request made against the Management service.

The following is an example JSON response body:


[{
   "CerBlob":[81,
   109,
   70,
   122,
   90,
   83,
   65,
   50,
   78,
   67,
   66,
   84,
   100,
   72,
   74,
   108,
   89,
   87,
   48,
   61],
   "ExpirationDate":"\/Date(928149600000+0000)\/",
   "FriendlyName":"String content",
   "HostNames":["String content"],
   "IssueDate":"\/Date(928149600000+0000)\/",
   "Issuer":"String content",
   "Password":"String content",
   "PfxBlob":[81,
   109,
   70,
   122,
   90,
   83,
   65,
   50,
   78,
   67,
   66,
   84,
   100,
   72,
   74,
   108,
   89,
   87,
   48,
   61],
   "PublicKeyHash":"String content",
   "SelfLink":"http:\/\/www.contoso.com\/",
   "SiteName":"String content",
   "SubjectName":"String content",
   "Thumbprint":"String content",
   "ToDelete":true,
   "Valid":true
}]

The following is an example XML response body:


<Certificates xmlns="http://schemas.microsoft.com/windowsazure">
  <Certificate>
    <CerBlob>QmFzZSA2NCBTdHJlYW0=</CerBlob>
    <ExpirationDate>1999-05-31T11:20:00</ExpirationDate>
    <FriendlyName>String content</FriendlyName>
    <HostNames>
      <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">String content</string>
      <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">String content</string>
    </HostNames>
    <IssueDate>1999-05-31T11:20:00</IssueDate>
    <Issuer>String content</Issuer>
    <Password>String content</Password>
    <PfxBlob>QmFzZSA2NCBTdHJlYW0=</PfxBlob>
    <PublicKeyHash>String content</PublicKeyHash>
    <SelfLink>http://www.contoso.com/</SelfLink>
    <SiteName>String content</SiteName>
    <SubjectName>String content</SubjectName>
    <Thumbprint>String content</Thumbprint>
    <ToDelete>true</ToDelete>
    <Valid>true</Valid>
  </Certificate>
  <Certificate>
    <CerBlob>QmFzZSA2NCBTdHJlYW0=</CerBlob>
    <ExpirationDate>1999-05-31T11:20:00</ExpirationDate>
    <FriendlyName>String content</FriendlyName>
    <HostNames>
      <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">String content</string>
      <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">String content</string>
    </HostNames>
    <IssueDate>1999-05-31T11:20:00</IssueDate>
    <Issuer>String content</Issuer>
    <Password>String content</Password>
    <PfxBlob>QmFzZSA2NCBTdHJlYW0=</PfxBlob>
    <PublicKeyHash>String content</PublicKeyHash>
    <SelfLink>http://www.contoso.com/</SelfLink>
    <SiteName>String content</SiteName>
    <SubjectName>String content</SubjectName>
    <Thumbprint>String content</Thumbprint>
    <ToDelete>true</ToDelete>
    <Valid>true</Valid>
  </Certificate>
</Certificates>

Any management certificate associated with the subscription specified by <Subscription-Id> can be used to authenticate this operation. For additional details, see Authenticating Service Management Requests.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft