List operation¶
Summary¶
List operation status/history for asynchronous APIs.
Type¶
- Get
Target object of API¶
- operation
Synchronous/Asynchronous¶
- synchronous
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v2.0/operations
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 | |
id | Query | String(UUID) | ID of operation | optional | Terminate | ||
service_type | Query | String(ECL::SDExchange::AWSConnection, ECL::SDExchange::TenantConnectionRequest, ECL::SDExchange::TenantConnection) | service type. | optional | Terminate | ||
resource_id | Query | String(UUID) | ID of resource. | optional | Terminate | ||
resource_type | Query | String(aws_connection, tenant_connection_request, tenant_connection) | Name of resources | optional | Terminate | ||
request_type | Query | String(Create, Update, Delete) | request type. | optional | Terminate | ||
operation_status | Query | String(processing, complete, error) | Status of phase. | optional | Terminate | ||
phase | Query | String() | operation phase, per resource_type | optional | Terminate | ||
latest | Query | String(true) | When true, only the latest operation will be returned. | optional | Terminate |
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
Response Body¶
Format¶
{
"operations": [
{
"id": "<id>",
"service_type": "<service_type>",
"resource_id": "<resource_id>",
"resource_type": "<resource_type>",
"request_type": "<request_type>",
"operation_status": "<operation_status>",
"reception_datetime": "<reception_datetime>",
"commit_datetime": "<commit_datetime>",
"phase": "<phase>",
"error": {},
"request_body": {},
}
]
}
Parameters¶
item | format | description |
operations | Array | |
id | String(8) | It identifies operation uniquely. |
service_type | String(ECL::SDExchange::AWSConnection, ECL::SDExchange::TenantConnectionRequest, ECL::SDExchange::TenantConnection) | Name of services |
resource_id | String(UUID) | It identifies resource uniquely. |
resource_type | String(aws_connection, tenant_connection_request, tenant_connection) | Name of resources |
request_type | String(Create, Update, Delete) | request type. |
operation_status | String(processing, complete, error) | Status of operation. |
reception_datetime | Datetime | Datetime when registered in operation. YYYY-MM-DD HH:MM:SS |
request_body | Object | Stored the request body when executing connection API. |
commit_datetime | Datetime | Datetime when operation completed. YYYY-MM-DD HH:MM:SS |
phase | String() | operation phase, per resource_type |
error | Object | Error reason. |
Sample Request and Response¶
Sample API request¶
Request URI¶
{api_endpoint}/v2.0/operations
Request Header¶
Content-Type: application/json
Accept: application/json
X-Auth-Token: 69105c889f824efdafb56af224208ad4
Request Body¶
This operation does not send a request body.
Sample API response¶
Response Header¶
HTTP/1.1 200 OK
Response Body¶
{
"operations": [
{
"commit_datetime": "2017-11-09 06:09:49",
"id": "00000061",
"phase": "create_resource",
"operation_status": "complete",
"reception_datetime": "2017-11-09 06:09:45",
"request_body": {
"tenant_connection_request": {
"description": "Test Request",
"name": "ExamRequest00",
"network_id": "1851361d-c9c7-44b9-b211-bbc848f833d9",
"tags": {
"hello": "world",
"はろー": "わーるど"
},
"tenant_id_other": "61707da70a8941f584bf107873dcf9bf"
}
},
"request_type": "Create",
"resource_id": "94fdccf6-c514-11e7-9d92-0050569c850d",
"resource_type": "tenant_connection_request",
"error": null,
"service_type": "ECL::SDExchange::TenantConnectionRequest"
}
]
}
Example error message¶
HTTP request¶
GET /v2.0/operations HTTP/1.1
User-Agent: curl/7.37.1
Host: 10.1.131.140
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 500 Internal Server Error
Server: nginx/1.8.0
Date: Mon, 28 Sep 2015 10:32:56 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 40
Connection: keep-alive
{
"cause": "Internal Server Error"
}