Creating an Endpoint
Description
This API is used to create an endpoint.
URI
POST /v2/{project_id}/routemgr/endpoints
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| endpoint | No | Endpoint object | Endpoint details. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| description | No | String | Endpoint description. The value contains a maximum of 255 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
| ief_instance_id | No | String | ID of a platinum service instance. If this parameter is left blank, the service instance is a professional service instance. |
| name | Yes | String | Endpoint name. The value contains a maximum of 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. The endpoint name must be unique under an account. |
| properties | Yes | Object | Endpoint properties, which need to be displayed externally. Example:
{"domain_id":"user's domain id"}
{"service_port":8080}
{"domain_id":"user's domain id"} |
| type | Yes | String | Endpoint type. Enumeration values:
|
Response Parameters
If a status code 201 is returned:
| Parameter | Type | Description |
|---|---|---|
| endpoint | EndpointResponse object | Endpoint details. |
| Parameter | Type | Description |
|---|---|---|
| created_at | String | Time when the endpoint is created. |
| description | String | Endpoint description. The value contains a maximum of 255 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
| id | String | Endpoint ID. |
| ief_instance_id | String | ID of a platinum service instance. If this parameter is left blank, the service instance is a professional service instance. |
| is_shared | Boolean | Whether the endpoint is shared. |
| name | String | Endpoint name. The value contains a maximum of 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. The endpoint name must be unique under an account. |
| project_id | String | Project ID. |
| properties | Object | Endpoint properties, which need to be displayed externally. Example:
{"domain id":"user's domain id"}
{"service port":8080}
{"domain id":"user's domain id"} |
| type | String | Endpoint type. Enumeration values:
|
| updated_at | String | Time when the endpoint is updated. |
If a status code 400 is returned:
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_message | String | Error description. |
If a status code 401 is returned:
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_message | String | Error description. |
If a status code 500 is returned:
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_message | String | Error description. |
Request Examples
{
"endpoint" : {
"name" : "dis_example",
"type" : "dis",
"properties" : {
"domain_id" : "8fd3691d01f44badab03e28d81abd4ff"
}
}
} Response Examples
If a status code 201 is returned:
{
"endpoint" : {
"name" : "dis_example",
"description" : "",
"type" : "dis",
"properties" : {
"domain_id" : "8fd3691d01f44badab03e28d81abd4ff"
},
"is_shared" : false,
"id" : "e7d02d47-961d-4e65-9f15-856272983ca9",
"project_id" : "d16e6eb6cc0d49a0941df2f31285757a",
"created_at" : "2018-11-26T01:07:18Z",
"updated_at" : "2018-11-26T01:07:18Z"
}
} If a status code 400 is returned:
{
"error_code" : "IEF.310001",
"error_message" : "XXXXXXXXXX"
} If a status code 401 is returned:
{
"error_code" : "IEF.310001",
"error_message" : "XXXXXXXXXX"
} If a status code 500 is returned:
{
"error_code" : "IEF.310001",
"error_message" : "XXXXXXXXXX"
} Status Codes
| Status Code | Description |
|---|---|
| 201 | The endpoint is successfully created. |
| 400 | Error response. |
| 401 | Error response. |
| 500 | Error response. |
Error Codes
See Error Codes.
Last Article: Querying a List of Endpoints
Next Article: Querying Details About an Endpoint
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.