Edit in GitHubLog an issue
Thanks to comwrap GmbH for contributing this topic!

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/status
  • GET /V1/bulk/:bulkUuid/operation-status/:status
  • GET /V1/bulk/:bulkUuid/detailed-status

Get the status summary

The GET <host>/rest/<store_code>/V1/bulk/:bulkUuid/status endpoint returns the abbreviated status of the specified operation:

Field nameData typeDescription
operations_list
Object
An array containing information about each operation in a bulk or asynchronous request.
id
Integer
Identifies the bulk or asynchronous request.
status
Integer
The operation status
* 1 = Complete
* 2 = The operation failed, but you can try to perform it again
* 3 = The operation failed. You must change something to retry it.
* 4 = Open
* 5 = Rejected
result_message
String
Describes the result of the operation. If successful, the value contains the string Service execution success as well as the method that executed the operation.
error_code
Integer
If applicable, an error code associated with the operation.
user_type
Integer
Type of user who made this request. Possible values are:
* 1 = Integration
* 2 = Administrator
* 3 = Customer
* 4 = Guest User
bulk_id
String
description
String
Contains the message queue topic.
start_time
String
The time that a bulk or asynchronous operation started.
user_id
Integer
The user ID that executed the request.
operation_count
Integer
The number of operations processed in the request.

Response:

Copied to your clipboard
{
"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 <host>/rest/<store_code>/V1/bulk/:bulkUuid/operation-status/:status endpoint returns the number of operations from the bulk batch that have the specified status.

StatusDescription
1
Complete
2
The operation failed, but you can try to perform it again.
3
The operation failed. You must change something to retry it.
4
Open
5
Rejected

Response:

Copied to your clipboard
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.

Copied to your clipboard
GET <host>/rest/<store_code>/V1/bulk/:bulkUuid/detailed-status
Field nameData typeDescription
operations_list
Object
An array containing information about each operation in a bulk or asynchronous request.
id
Integer
Identifies the bulk or asynchronous request.
bulk_uuid
String
topic_name
String
The name of the message queue topic, in the format async.<service.contract.path>.<method>. The service contract path is lowercase, and the method is either post, put, or delete.
serialized_data
String
An array of serialized input data. It contains serialized JSON with the following keys: entity_id - null, entity_link - an empty string, meta_info - the body of the API request that was executed.
result_serialized_data
String
Contains serialized output of the corresponding synchronous API call. For example, if you call POST /async/V1/products, this field contains serialized response from POST /V1/products.
status
Integer
The operation status
* 1 = Complete
* 2 = The operation failed, but you can try to perform it again
* 3 = The operation failed. You must change something to retry it.
* 4 = Open
* 5 = Rejected
result_message
String
Describes the result of the operation. If successful, the value contains the string Service execution success as well as the method that executed the operation.
error_code
Integer
If applicable, an error code associated with the operation.
user_type
Integer
Type of user who made this request. Possible values are:
* 1 = Integration
* 2 = Administrator
* 3 = Customer
* 4 = Guest User
bulk_id
String
description
String
Contains the message queue topic name.
start_time
String
The time that a bulk or asynchronous operation started.
user_id
Integer
The user ID that executed the request.
operation_count
Integer
The number of operations processed in the request.

Response:

Copied to your clipboard
{
"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
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.