Search for the status of a bulk operation

The Status Operation Search endpoint (GET /V1/bulk/?searchCriteria) allows you to search for bulk operation statuses.

You can specify any of the following fields to filter on operation statuses:

  • start_time - The time that a bulk operation started.
  • status - 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
  • bulk_uuid - UUID generated by an asynchronous API request or Bulk API request.
  • topic_name - Queue topic name

Sample usage

The following call returns bulk operations that contain an error that cannot be retried.

GET http://<magento_host>/rest/V1/bulk/?
searchCriteria[filter_groups][0][filters][0][field]=status&
searchCriteria[filter_groups][0][filters][0][value]=3&
searchCriteria[filter_groups][0][filters][0][condition_type]=eq

See Search using REST APIs for more information about the syntax of search requests.

Response

The operation with bulk UUID c43ed402-3dd3-4100-92e2-dc5852d3009b contains a status code of 3.

{
    "items": [
        {
            "extension_attributes": {
                "start_time": "2018-07-11 20:07:14"
            },
            "id": 4,
            "bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
            "topic_name": "async.V1.customers.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
        },
        {
            "extension_attributes": {
                "start_time": "2018-07-11 20:07:14"
            },
            "id": 5,
            "bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
            "topic_name": "async.V1.customers.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
        },
        {
            "extension_attributes": {
                "start_time": "2018-07-11 20:07:14"
            },
            "id": 6,
            "bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
            "topic_name": "async.V1.customers.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
        },
        {
            "extension_attributes": {
                "start_time": "2018-07-11 20:07:14"
            },
            "id": 7,
            "bulk_uuid": "c43ed402-3dd3-4100-92e2-dc5852d3009b",
            "topic_name": "async.V1.customers.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
        },
        {
            "extension_attributes": {
                "start_time": "2018-07-11 20:58:31"
            },
            "id": 10,
            "bulk_uuid": "799a59c0-09ca-4d60-b432-2953986c1c38",
            "topic_name": "async.V1.customers.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
        }
    ],
    "search_criteria": {
        "filter_groups": [
            {
                "filters": [
                    {
                        "field": "status",
                        "value": "3",
                        "condition_type": "eq"
                    }
                ]
            }
        ]
    },
    "total_count": 5
}