# core.bulk

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

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

calls 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 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.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: method

#### method

Type: string

Method name to execute for each parameter set.

##### Parameter 2: params

#### params

Type: array of array

Array of parameter arrays, each representing one method call.

No Additional Items

##### Each item of this array must be:

Type: array
No Additional Items

##### Each item of this array must be:

Type: object

##### Parameter 3: description

#### description

Default: null

Format string for job progress (e.g. "Deleting snapshot {0[dataset]}@{0[name]}").

## Any of

Type: string
Type: null

##

#### Result

Type: array of object

Array of results for each bulk operation item.

No Additional Items

##### Each item of this array must be:

#### CoreBulkResultItem

Type: object
No Additional Properties

##

#### Job Id

Job ID for this bulk operation item or `null` if it failed to start.

## Any of

Type: integer
Type: null

##

#### Error

Error message if this item failed or `null` on success.

## Any of

Type: string

Must be at most `2147483647` characters long

Type: null

##

#### Result

Type: object

Result data returned by this bulk operation item.

Required roles: