List Operation¶
Summary¶
List operation information and history of CIC.
Type¶
- List
Target object of API¶
- Operation
Synchronous/Asynchronous¶
- Synchronous
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v1.0/ecc/operations
HTTP Request Header¶
Content-Type: application/json
Accept: application/json
X-Auth-Token: <token_id>
HTTP Request Body¶
- none
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 | Query | String(15) | It identifies mCIC uniquely. If specified mcic_id, this API returns all operation history associated with mCIC. You can get the latest operation to search latest reciept_date. | optional(Either mcic_id or cic_id is required.) | |||
cic_id | Query | String(20) | It identifies CIC uniquely. If specified mcic_id, this API returns all operation history associated with CIC. You can get the latest operation to search latest reciept_date. | optional(Either mcic_id or cic_id is required.) |
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"
Response Body¶
Format¶
[{
"operation_id": "<operation id>",
"operation_status": "<operation status>",
"operation_type": "<operation type>",
"operation_body": {},
"mcic_id": "<mcic id>",
"cic_id": "<cic id>",
"user_id": "<user id>",
"user_name": "<user name>",
"reciept_date": "<date>",
"error_messages": ["<error message>","<error message>"]
}]
Parameters¶
item | format | description |
operation_id | String | It identifies operation uniquely. Operation ID is generated when customer offered create , update, and delete. |
operation_status | String | Status of operation. processing/success/failure are displayed. |
operation_type | String | Type of operations. create/delete/update are displayed. |
operation_body | Object | This object stored request body. |
mcic_id | String | It identifies mCIC uniquely which corresponded to your processing. |
cic_id | String | It identifies CIC uniquely which corresponded to your processing. |
user_id | String | It identifies customer user uniquely which executed the operation. |
user_name | String | Customer user name which executed the operation. |
reciept_date | dateTime | The date when this API receipted operation. |
error_messages | Array | This Array stored error messages which responded from backend systems. |
Sample Request and Response¶
Sample API request¶
Request URI¶
http://{api_endpoint}/v1.0/ecc/operations?mcic_id=CIC-JP-A0000001
http://{api_endpoint}/v1.0/ecc/operations?cic_id=CIC-JP-A0000001-0001
Request Header¶
Content-Type: application/json
Accept: application/json
X-Auth-Token: 69105c889f824efdafb56af224208ad4
Request Body¶
- none
Sample API response¶
Response Header¶
HTTP/1.1 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"
Response Body¶
/// If specified mcic_id, this format returned.
[{
"operation_id": "ECC0000000100",
"operation_status": "complete",
"operation_type": "create",
"operation_body": {},
"mcic_id": "CIC-JP-A0000001",
"user_id": "1234567",
"user_name": "joe",
"reciept_date": "2015-07-01 00:00:00"
"error_messages": [""]
},
{
"operation_id": "ECC0000000150",
"operation_status": "failure",
"operation_type": "create",
"operation_body": {},
"mcic_id": "CIC-JP-A0000001",
"user_id": "1234567",
"user_name": "joe",
"reciept_date": "2015-07-15 00:00:00"
"error_messages": ["validation error"]
},
{
"operation_id": "ECC0000000200",
"operation_status": "processing",
"operation_type": "delete",
"operation_body": {},
"mcic_id": "CIC-JP-A0000001",
"user_id": "1234567",
"user_name": "joe",
"reciept_date": "2015-08-01 00:00:00"
"error_messages": [""]
}]
/// If specified cic_id, this format returned.
[{
"operation_id": "ECC0000000100",
"operation_status": "complete",
"operation_type": "create",
"operation_body": {},
"cic_id": "CIC-JP-A0000001-0001",
"user_id": "1234567",
"user_name": "joe",
"reciept_date": "2015-07-01 00:00:00"
"error_messages": [""]
},
{
"operation_id": "ECC0000000150",
"operation_status": "failure",
"operation_type": "create",
"operation_body": {},
"cic_id": "CIC-JP-A0000001-0001",
"user_id": "1234567",
"user_name": "joe",
"reciept_date": "2015-07-15 00:00:00"
"error_messages": ["validation error"]
},
{
"operation_id": "ECC0000000200",
"operation_status": "processing",
"operation_type": "delete",
"operation_body": {},
"cic_id": "CIC-JP-A0000001-0001",
"user_id": "1234567",
"user_name": "joe",
"reciept_date": "2015-08-01 00:00:00"
"error_messages": [""]
}]
Example error message¶
HTTP request¶
GET /v1.0/ecc/operations?mcic_id=CIC-JP-A0000000 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
HTTP Response¶
HTTP/1.1 500 HTTP 500: Internal Server Error
Server: nginx/1.8.0
Date: Mon, 28 Sep 2015 10:19:08 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 40
Connection: keep-alive
{
"cause": "Internal Server Error"
}