core.bulk
=========

Will sequentially call ``method`` with the arguments from each entry of the ``params`` list. For example, calling :doc:`core.bulk <api_methods_core.bulk>` with these parameters::

    [
        "zfs.resource.destroy",
        [
            [{"path": "tank@snap-1", "recursive": true}],
            [{"path": "tank@snap-2", "recursive": false}]
        ]
    ]

calls :doc:`zfs.resource.destroy <api_methods_zfs.resource.destroy>` twice: first with ``{"path": "tank@snap-1", "recursive": true}``, then with ``{"path": "tank@snap-2", "recursive": false}``.

If the first call fails and the second succeeds (returning ``true``), the result of the overall call will be::

    [
        {"result": null, "error": "Error deleting snapshot"},
        {"result": true, "error": null}
    ]

.. important::

    The execution status of :doc:`core.bulk <api_methods_core.bulk>` will always be a ``SUCCESS`` (unless
    an unlikely internal error occurs). Caller must check for individual call results
    to ensure the absence of any call errors.

This method is a job.

.. raw:: html

    <div id="json-schema">
    <span class="badge badge-dark value-type">Type: object</span><br/>
    <div class="accordion" id="accordionCall_parameters">
    <div class="card">
    <div class="card-header" id="headingCall_parameters">
    <h2 class="mb-0">
    <button aria-controls="Call_parameters" aria-expanded="" class="btn btn-link property-name-button" data-target="#Call_parameters" data-toggle="collapse" onclick="setAnchor('#Call_parameters')" type="button"><span class="property-name">Call parameters</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingCall_parameters" class="collapse property-definition-div" data-parent="#accordionCall_parameters" id="Call_parameters">
    <div class="card-body pl-5">
    <span class="badge badge-dark value-type">Type: array</span><br/>
    <span class="badge badge-info no-additional">No Additional Items</span><h4>Tuple Validation</h4>
    <h5>Parameter 1: method</h5>
    <div class="card">
    <div class="card-body items-definition" id="Call_parameters_items_i0">
    <h4>method</h4><span class="badge badge-dark value-type">Type: string</span><br/>
    <span class="description"><p>Method name to execute for each parameter set.</p>
    </span>
    </div>
    </div>
    <h5>Parameter 2: params</h5>
    <div class="card">
    <div class="card-body items-definition" id="Call_parameters_items_i1">
    <h4>params</h4><span class="badge badge-dark value-type">Type: array of array</span><br/>
    <span class="description"><p>Array of parameter arrays, each representing one method call.</p>
    </span>
    <span class="badge badge-info no-additional">No Additional Items</span><h5>Each item of this array must be:</h5>
    <div class="card">
    <div class="card-body items-definition" id="Call_parameters_items_i1_items">
    <span class="badge badge-dark value-type">Type: array</span><br/>
    <span class="badge badge-info no-additional">No Additional Items</span><h5>Each item of this array must be:</h5>
    <div class="card">
    <div class="card-body items-definition" id="Call_parameters_items_i1_items_items">
    <span class="badge badge-dark value-type">Type: object</span><br/>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    <h5>Parameter 3: description</h5>
    <div class="card">
    <div class="card-body items-definition" id="Call_parameters_items_i2">
    <h4>description</h4> <span class="badge badge-success default-value">Default: null</span><br/>
    <span class="description"><p>Format string for job progress (e.g. "Deleting snapshot {0[dataset]}@{0[name]}").</p>
    </span><div class="any-of-value" id="Call_parameters_items_i2_anyOf"><h2 class="handle">
    <label>Any of</label>
    </h2><ul class="nav nav-tabs" id="tabsCall_parameters_items_i2_anyOf_anyOf" role="tablist"><li class="nav-item">
    <a class="nav-link active anyOf-option" data-toggle="tab" href="#tab-pane_Call_parameters_items_i2_anyOf_i0" id="Call_parameters_items_i2_anyOf_i0" onclick="setAnchor('#Call_parameters_items_i2_anyOf_i0')" role="tab">Option 1</a>
    </li><li class="nav-item">
    <a class="nav-link anyOf-option" data-toggle="tab" href="#tab-pane_Call_parameters_items_i2_anyOf_i1" id="Call_parameters_items_i2_anyOf_i1" onclick="setAnchor('#Call_parameters_items_i2_anyOf_i1')" role="tab">Option 2</a>
    </li></ul>
    <div class="tab-content card"><div class="tab-pane fade card-body active show" id="tab-pane_Call_parameters_items_i2_anyOf_i0" role="tabpanel">
    <span class="badge badge-dark value-type">Type: string</span><br/>
    </div><div class="tab-pane fade card-body" id="tab-pane_Call_parameters_items_i2_anyOf_i1" role="tabpanel">
    <span class="badge badge-dark value-type">Type: null</span><br/>
    </div></div></div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value">
    <div class="card">
    <div class="card-header" id="headingReturn_value">
    <h2 class="mb-0">
    <button aria-controls="Return_value" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value" data-toggle="collapse" onclick="setAnchor('#Return_value')" type="button"><span class="property-name">Return value</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value" class="collapse property-definition-div" data-parent="#accordionReturn_value" id="Return_value">
    <div class="card-body pl-5">
    <h4>Result</h4><span class="badge badge-dark value-type">Type: array of object</span><br/>
    <span class="description"><p>Array of results for each bulk operation item.</p>
    </span>
    <span class="badge badge-info no-additional">No Additional Items</span><h5>Each item of this array must be:</h5>
    <div class="card">
    <div class="card-body items-definition" id="Return_value_items">
    <h4>CoreBulkResultItem</h4><span class="badge badge-dark value-type">Type: object</span><br/>
    <span class="badge badge-info no-additional">No Additional Properties</span>
    <div class="accordion" id="accordionReturn_value_items_job_id">
    <div class="card">
    <div class="card-header" id="headingReturn_value_items_job_id">
    <h2 class="mb-0">
    <button aria-controls="Return_value_items_job_id" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_items_job_id" data-toggle="collapse" onclick="setAnchor('#Return_value_items_job_id')" type="button"><span class="property-name">job_id</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_items_job_id" class="collapse property-definition-div" data-parent="#accordionReturn_value_items_job_id" id="Return_value_items_job_id">
    <div class="card-body pl-5">
    <h4>Job Id</h4><br/>
    <span class="description"><p>Job ID for this bulk operation item or <code>null</code> if it failed to start.</p>
    </span><div class="any-of-value" id="Return_value_items_job_id_anyOf"><h2 class="handle">
    <label>Any of</label>
    </h2><ul class="nav nav-tabs" id="tabsReturn_value_items_job_id_anyOf_anyOf" role="tablist"><li class="nav-item">
    <a class="nav-link active anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_items_job_id_anyOf_i0" id="Return_value_items_job_id_anyOf_i0" onclick="setAnchor('#Return_value_items_job_id_anyOf_i0')" role="tab">Option 1</a>
    </li><li class="nav-item">
    <a class="nav-link anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_items_job_id_anyOf_i1" id="Return_value_items_job_id_anyOf_i1" onclick="setAnchor('#Return_value_items_job_id_anyOf_i1')" role="tab">Option 2</a>
    </li></ul>
    <div class="tab-content card"><div class="tab-pane fade card-body active show" id="tab-pane_Return_value_items_job_id_anyOf_i0" role="tabpanel">
    <span class="badge badge-dark value-type">Type: integer</span><br/>
    </div><div class="tab-pane fade card-body" id="tab-pane_Return_value_items_job_id_anyOf_i1" role="tabpanel">
    <span class="badge badge-dark value-type">Type: null</span><br/>
    </div></div></div>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_items_error">
    <div class="card">
    <div class="card-header" id="headingReturn_value_items_error">
    <h2 class="mb-0">
    <button aria-controls="Return_value_items_error" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_items_error" data-toggle="collapse" onclick="setAnchor('#Return_value_items_error')" type="button"><span class="property-name">error</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_items_error" class="collapse property-definition-div" data-parent="#accordionReturn_value_items_error" id="Return_value_items_error">
    <div class="card-body pl-5">
    <h4>Error</h4><br/>
    <span class="description"><p>Error message if this item failed or <code>null</code> on success.</p>
    </span><div class="any-of-value" id="Return_value_items_error_anyOf"><h2 class="handle">
    <label>Any of</label>
    </h2><ul class="nav nav-tabs" id="tabsReturn_value_items_error_anyOf_anyOf" role="tablist"><li class="nav-item">
    <a class="nav-link active anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_items_error_anyOf_i0" id="Return_value_items_error_anyOf_i0" onclick="setAnchor('#Return_value_items_error_anyOf_i0')" role="tab">Option 1</a>
    </li><li class="nav-item">
    <a class="nav-link anyOf-option" data-toggle="tab" href="#tab-pane_Return_value_items_error_anyOf_i1" id="Return_value_items_error_anyOf_i1" onclick="setAnchor('#Return_value_items_error_anyOf_i1')" role="tab">Option 2</a>
    </li></ul>
    <div class="tab-content card"><div class="tab-pane fade card-body active show" id="tab-pane_Return_value_items_error_anyOf_i0" role="tabpanel">
    <span class="badge badge-dark value-type">Type: string</span><br/>
    <p><span class="badge badge-light restriction max-length-restriction" id="Return_value_items_error_anyOf_i0_maxLength">Must be at most <code>2147483647</code> characters long</span></p>
    </div><div class="tab-pane fade card-body" id="tab-pane_Return_value_items_error_anyOf_i1" role="tabpanel">
    <span class="badge badge-dark value-type">Type: null</span><br/>
    </div></div></div>
    </div>
    </div>
    </div>
    </div>
    <div class="accordion" id="accordionReturn_value_items_result">
    <div class="card">
    <div class="card-header" id="headingReturn_value_items_result">
    <h2 class="mb-0">
    <button aria-controls="Return_value_items_result" aria-expanded="" class="btn btn-link property-name-button" data-target="#Return_value_items_result" data-toggle="collapse" onclick="setAnchor('#Return_value_items_result')" type="button"><span class="property-name">result</span> <span class="badge badge-warning required-property">Required</span></button>
    </h2>
    </div>
    <div aria-labelledby="headingReturn_value_items_result" class="collapse property-definition-div" data-parent="#accordionReturn_value_items_result" id="Return_value_items_result">
    <div class="card-body pl-5">
    <h4>Result</h4><span class="badge badge-dark value-type">Type: object</span><br/>
    <span class="description"><p>Result data returned by this bulk operation item.</p>
    </span>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div><br><br>

*Required roles:* 

