Binding a Domain Name
Function
Domain names are user-defined, and take effect only after CNAME records are added to point the domain names to subdomain names of API groups. For details, see Adding a Record Set.
An API group can be bound to a maximum of five domain names. After you bind a domain name to an API group, APIs in the group can be called using the domain name.
URI
The following table lists the HTTP/HTTPS request method and URI of the API.
| Request Method | URI |
|---|---|
| POST | /v1/{project_id}/apigw/instances/{instance_id}/api-groups/{group_id}/domains |
The following table lists the parameters in the URI.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID, which can be obtained by the administrator on the My Credentials page. |
| instance_id | Yes | String | Instance ID, which can be obtained from the dedicated gateway information on the API Gateway console. |
| group_id | Yes | String | API group ID |
Request
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| url_domain | Yes | String | Domain name A domain name consists of a maximum of 255 characters and must comply with domain name specifications. |
Example request:
{
"url_domain": "www.MyCompany.com"
} Response
| Parameter | Type | Description |
|---|---|---|
| id | String | Domain ID |
| url_domain | String | Domain name |
| status | Integer | CNAME resolution status, which can be:
|
Example response:
{
"id": "c5e0d5ba62a34d26ad5c709ae22c1a17",
"url_domain": "www.MyCompany.com",
"status": 3
} Status Codes
| Status Code | Description |
|---|---|
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Server Internal Error |
Last Article: Object Model
Next Article: Unbinding a Domain Name
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.