# core.bulk

Will sequentially call method with arguments from the params list. For example, running

> call( “core.bulk”, “zfs.resource.destroy”, [

>   {“path”: “tank@snap-1”, “recursive”: True}, {“path”: “tank@snap-2”, “recursive”: False} ]

> )

will call

> call(“zfs.resource.destroy”, {“path”: tank@snap-1”, recursive=True}) call(“zfs.resource.destroy”, {“path”: “tank@snap-2”, recursive=False)

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

> [ {“result”: null, “error”: “Error deleting snapshot”}, {“result”: true, “error”: null} ]

Important note: 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
Type: null

##

#### Result

Type: object

Result data returned by this bulk operation item.

Required roles: