Bulk operation status endpoints
Adobe Commerce generates a bulk_uuid each time it executes an asynchronous API request. You can track the status of an asynchronous operation with the following endpoints:
GET /V1/bulk/:bulkUuid/statusGET /V1/bulk/:bulkUuid/operation-status/:statusGET /V1/bulk/:bulkUuid/detailed-status
Get the status summary
The GET /V1/bulk/:bulkUuid/status endpoint returns the abbreviated status of the specified operation:
operations_listidstatus1 = Complete <br/>* 2 = The operation failed, but you can try to perform it again<br/>* 3 = The operation failed. You must change something to retry it.<br/>* 4 = Open<br/>* 5 = Rejectedresult_messageService execution success as well as the method that executed the operation.error_codeuser_type1 = Integration <br/>* 2 = Administrator <br/>* 3 = Customer <br/>* 4 = Guest Userdescriptionstart_timeuser_idoperation_countRequest:
data-src=../../includes/paas-only.md
GET https://<host>/rest/<store-view-code>/V1/bulk/:bulkUuid/status
data-src=../../includes/saas-only.md
GET https://<server>.api.commerce.adobe.com/<tenant-id>/V1/bulk/:bulkUuid/status
Response:
{
"operations_list": [
{
"id": 12,
"status": 1,
"result_message": "Service execution success Magento\\Catalog\\Model\\ProductRepository\\Interceptor::save",
"error_code": null
}
],
"user_type": 2,
"bulk_id": "fbfca270-7a90-4c4e-9f32-d6cf3728cdc7",
"description": "Topic async.magento.catalog.api.productrepositoryinterface.save.put",
"start_time": "2018-07-12 16:07:53",
"user_id": 1,
"operation_count": 1
}
Get operations count by bulk uuid and status
The GET /V1/bulk/:bulkUuid/operation-status/:status endpoint returns the number of operations from the bulk batch that have the specified status.
12345Request:
data-src=../../includes/paas-only.md
GET https://<host>/rest/<store-view-code>/V1/bulk/:bulkUuid/operation-status/:status
data-src=../../includes/saas-only.md
GET https://<server>.api.commerce.adobe.com/<tenant-id>/V1/bulk/:bulkUuid/operation-status/:status
Response:
0
Get the detailed status
The GET /V1/bulk/:bulkUuid/detailed-status endpoint returns detailed information about status of a specified operation. It is similar to the GET /V1/bulk/:bulkUuid/status endpoint, except that the operations_list array also contains the message queue topic name and serialized data for each operation.
operations_listidtopic_nameasync.<service.contract.path>.<method>. The service contract path is lowercase, and the method is either post, put, or delete.serialized_dataentity_id - null, entity_link - an empty string, meta_info - the body of the API request that was executed.result_serialized_dataPOST /async/V1/products, this field contains serialized response from POST /V1/products.status1 = Complete <br/>* 2 = The operation failed, but you can try to perform it again<br/>* 3 = The operation failed. You must change something to retry it.<br/>* 4 = Open<br/>* 5 = Rejectedresult_messageService execution success as well as the method that executed the operation.error_codeuser_type1 = Integration <br/>* 2 = Administrator <br/>* 3 = Customer <br/>* 4 = Guest Userdescriptionstart_timeuser_idoperation_countRequest:
data-src=../../includes/paas-only.md
GET https://<host>/rest/<store-view-code>/V1/bulk/:bulkUuid/detailed-status
data-src=../../includes/saas-only.md
GET https://<server>.api.commerce.adobe.com/<tenant-id>/V1/bulk/:bulkUuid/detailed-status
Response:
{
"operations_list": [
{
"id": 4,
"bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
"topic_name": "async.magento.customer.api.accountmanagementinterface.createaccount.post",
"serialized_data": "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"mshaw@example.com\\\",\\\"firstname\\\":\\\"Melanie Shaw\\\",\\\"lastname\\\":\\\"Doe\\\"},\\\"password\\\":\\\"Password1\\\",\\\"redirectUrl\\\":\\\"\\\"}\"}",
"result_serialized_data": null,
"status": 3,
"result_message": "A customer with the same email address already exists in an associated website.",
"error_code": 0
},
{
"id": 5,
"bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
"topic_name": "async.magento.customer.api.accountmanagementinterface.createaccount.post",
"serialized_data": "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"bmartin@example.com\\\",\\\"firstname\\\":\\\"Bryce\\\",\\\"lastname\\\":\\\"Martin\\\"},\\\"password\\\":\\\"Password1\\\",\\\"redirectUrl\\\":\\\"\\\"}\"}",
"result_serialized_data": null,
"status": 3,
"result_message": "A customer with the same email address already exists in an associated website.",
"error_code": 0
},
{
"id": 6,
"bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
"topic_name": "async.magento.customer.api.accountmanagementinterface.createaccount.post",
"serialized_data": "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"bmartin@example.com\\\",\\\"firstname\\\":\\\"Bryce\\\",\\\"lastname\\\":\\\"Martin\\\"},\\\"password\\\":\\\"Password1\\\",\\\"redirectUrl\\\":\\\"\\\"}\"}",
"result_serialized_data": null,
"status": 3,
"result_message": "A customer with the same email address already exists in an associated website.",
"error_code": 0
},
{
"id": 7,
"bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
"topic_name": "async.magento.customer.api.accountmanagementinterface.createaccount.post",
"serialized_data": "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"tgomez@example.com\\\",\\\"firstname\\\":\\\"Teresa\\\",\\\"lastname\\\":\\\"Gomez\\\"},\\\"password\\\":\\\"Password1\\\",\\\"redirectUrl\\\":\\\"\\\"}\"}",
"result_serialized_data": null,
"status": 3,
"result_message": "A customer with the same email address already exists in an associated website.",
"error_code": 0
}
],
"user_type": 2,
"bulk_id": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
"description": "Topic async.magento.customer.api.accountmanagementinterface.createaccount.post",
"start_time": "2018-07-11 20:07:14",
"user_id": null,
"operation_count": 4
}