Create CICs¶
Summary¶
Create contract informations of CIC.
Type¶
- Create
Target object of API¶
- CIC
Synchronous/Asynchronous¶
- Asynchronous
Request¶
HTTP Request Method¶
- POST
HTTP Request Path¶
{api_endpoint}/v1.0/ecc/mCICs/{mcic_id}/CICs
HTTP Request Header¶
Content-Type: application/json
Accept: application/json
X-Auth-Token: <token_id>
HTTP Request Body¶
Parameters¶
name | style | format | description | required/optional | default value | action for invalid parameter | response code for invalid parameter |
---|---|---|---|---|---|---|---|
token_id | Header | authentication token string(varchar) | keystone authentication token | required | Terminate | 401 | |
mcic_id | URL | String(15) | It identifies mCIC uniquely | required | Terminate | 404 | |
cic_name | Body | String(1-255) | CIC friendly name. | required | Terminate | 400 | |
network_id | Body | String(36) | It identifies network in Smart Data Platform uniquely. | required | Terminate | 400 or 404 | |
colo_vlan | Body | Int(1-4) | User vlan. | required(If service_type is NGC-colo this parameter is required.) | Terminate | 400 | |
server_segment_nbr | Body | Int(1-2) | Server segment number associate with service id. | required(If service_type is NGC-EC this parameter is required.) | Terminate | 400 |
Response¶
Response Header¶
Format¶
HTTP/1.1 <response_code> <message> (ex. 200 OK)
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"
Sample Request and Response¶
Sample API request¶
Request URI¶
http://{api_endpoint}/v1.0/ecc/mCICs/CLC-JP-00000000/CICs
Request Header¶
Content-Type: application/json
Accept: application/json
X-Auth-Token: 69105c889f824efdafb56af224208ad4
Request Body¶
/// If service_type is "NGC-EC", this format is required.
{
"network_id": "cbbafd82-8f99-4eda-9e46-97ddf24bdxxx",
"cic_name": "friendly name",
"server_segment_nbr": 1
}
/// If service_type is "NGC-colo", this format is required.
{
"network_id": "cbbafd82-8f99-4eda-9e46-97ddf24bdxxx",
"cic_name": "friendly name",
"colo_vlan": 1000
}
Sample API response¶
Response Header¶
HTTP/1.1 201
OK
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"
Response Body¶
{
"operation_id": "ECC0000000015",
"cic_id": "CLC-JP-00000000-0000"
}
Example error message¶
HTTP request¶
POST /v1.0/ecc/mCICs/CLC-JP-00000000/CICs HTTP/1.1
User-Agent: curl/7.37.1
Host: 192.168.150.71:9001
Content_type:application/json
Accept:application/json
X-Auth-Token:4e54395a12b740d585d74190ba4eb14b
Content-Length: 73
Content-Type: application/x-www-form-urlencoded
HTTP Response¶
HTTP/1.1 400 HTTP 400: Bad Request
Server: nginx/1.8.0
Date: Mon, 28 Sep 2015 10:32:56 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 39
Connection: keep-alive
{
"cause": "Invalid request body"
}