Adding a Certificate to a Domain Name
Function
When you create an API to be accessed through HTTPS, you must add an SSL certificate to the independent domain name that has been bound to the group the API belongs to.
This API is used to add a certificate to a specific domain name.
URI
The following table lists the HTTP/HTTPS request method and URI of the API.
Request Method |
URI |
---|---|
POST |
/v1.0/apigw/api-groups/{group_id}/domains/{domain_id}/certificate |
The following table lists the parameters in the URI.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
group_id |
Yes |
String |
API group ID |
domain_id |
Yes |
String |
Domain ID |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Certificate name A certificate name consists of 4–50 characters, starting with a letter. Only letters, digits, and underscores (_) are allowed. |
cert_content |
Yes |
String |
Content of the certificate |
private_key |
Yes |
String |
Private key |
Example request:
{ "cert_content": "example", "name": "test_ssl", "private_key": "example" }
Response
Parameter |
Type |
Description |
---|---|---|
id |
String |
Domain ID |
url_domain |
String |
Domain name |
status |
Integer |
CNAME resolution status |
ssl_id |
String |
Certificate ID |
ssl_name |
String |
Certificate name |
{ "id": " b9be707660c5406394f8973e087bae20", "url_domain": "www.example.com", "status": 3, "ssl_id ": "0a515af69f4e4dcca84fbf85f68c0e27", "ssl_name": "Certificate" }
Status Codes
Status Code |
Description |
---|---|
201 |
Created |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Server Internal Error |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot