Import Certificate
POST {{apiPath}}/environments/{{envID}}/customDomains/{{customDomainID}}
The POST /environments/{{envID}}/customDomains/{{customDomainID}}
operation imports the SSL certificate used by the custom domain resource. The request is valid when the status
property value is set to SSL_CERTIFICATE_REQUIRED
or ACTIVE
. This operation uses the application/vnd.pingidentity.certificate.import+json
custom media type as the content type in the request header.
Note: The certificate
, intermediateCertificates
, and privateKey
property values in the request body must be expressed as a single line. To account for line breaks in the text, you must use the \\n
newline escape characters to represent a line break. For example, the following certificate
text:
-----BEGIN CERTIFICATE-----
MIIFXDCCBESg...
must be written in the request body JSON as:
-----BEGIN CERTIFICATE-----\nMIIFXDCCBESg...
If any of the certificates and keys are invalid, the response returns an INVALID_VALUE
error. If the request is successful, the response returns a 200 OK
message.
Note: When the status
property returned in the response is ACTIVE
, remember that it can take some time before the custom domain is operational.
Prerequisites
- Create a domain to get a
{{customDomainID}}
for the endpoint. For more information, see Custom Domains.
Request Body
{"certificate"=>"{{certificate}}", "intermediateCertificates"=>"{{intermediateCertificate}}", "privateKey"=>"{{privateKey}}"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/customDomains/4490de20-a93d-4369-82a5-b04f935c522a"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"}},"id":"93838ab0-0238-40fa-ae4e-6b890882d323","domainName":"custom-domain.example.com","status":"ACTIVE","certificate":{"expiresAt":"2022-06-04T21:52:34.866Z"}}