Get Attached Certificate Of Domain
The API is used to retrieve the certificate attached to a domain.
Request
Request-Line
GET /cdn/v1.0/services/{serviceId}/certificates?domainName={domainName} HTTP/1.1
Request Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| serviceId | Integer | Mandatory | The unique identifier of the service. |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| domainName | String | Mandatory | The domain name associated with the specified service ID. |
Response
Response Body
| Parameter | Type | Description |
|---|---|---|
| certificateId | Integer | The unique identifier of the certificate. |
| domainName | String | Certificate Name. Only present after a successful Attach Certificate to Domain operation. |
| certType | String | The certificate type. Possible values: manual, auto, or none. |
| autocertRequestStatus | String | Auto certificate request status. Possible values: issued, issuing, or failed. Only present after requesting an auto certificate. |
| autocertRequestTime | Integer | The request time of auto certificate in Unix epoch milliseconds. Only present after requesting an auto certificate. |
| validFrom | String | Certificate start time in Unix epoch milliseconds. Only present after a certificate is attached. |
| validTo | String | Certificate expiry time in Unix epoch milliseconds. Only present after a certificate is attached. |
Status Codes, Error Codes and Error Messages
| Status Code | Error Code | Error Message |
|---|---|---|
| 400 | ServiceId.Invalid | Service ID is empty or invalid. |
| 400 | DomainName.Invalid | Domain name is empty or invalid. |
| 400 | InvalidService.IdPermission | Service ID cannot be found or unknown. |
| 400 | InvalidCertificate.DomainNameEmpty | Domain name cannot be empty. |
| 404 | InvalidService.DomainNameNotFound | Domain name cannot be found. |
Examples
Get Attached Certificate Of Domain
Request
GET /cdn/v1.0/services/228771/certificates?domainName=2.FlashCone.com HTTP/1.1
{
"certificateId": 2978,
"domainName": "*.FlashCone.com",
"certType": "manual",
"validFrom": 1747618629000,
"validTo": 1776918778000
}
Successful Response Body
HTTP/1.1 200