Skip to main content

Attach Certificate to Domain

Attaches a certificate to a domain for website acceleration. When attaching a new certificate to a domain with a certificate, the new certificate will override the old certificate.

Request

Request-Line

POST /cdn/v1.0/services/{serviceId}/certificates HTTP/1.1

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
serviceIdIntegerMandatoryService ID.

Body Parameters

ParameterTypeRequiredDescription
certificateIdIntegerMandatoryCertificate ID.
domainNameStringMandatoryThe domainName is one of the domains associated with the serviceId.

Response

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400InvalidCustomer.IdEmptyCustomer id can be empty or invalid.
400InvalidService.IdIncorrectService id is empty or invalid.
400ServiceId.IdPermissionServiceId can not be found or unknown.
400InvalidCertificate.IdThe CertificateId is empty or invalid.
400InvalidCertificate.DomainNameEmptyDomain Name cannot be empty.

Examples

Attach Certificate to Domain

Request

POST /cdn/v1.0/services/228771/certificates HTTP/1.1

{
"certificateId":2978,
"domainName":"2.swiftfederation.com"
}

Successful Response Body

HTTP/1.1 200