Skip to main content
POST
Run a bulk action over every record a register's filter matches, in the background.

Headers

Prefer
enum<string>

Preference

Available options:
params=single-object

Body

Run a bulk action over every record a register's filter matches, in the background.

p_action names what to do, and p_arguments what with:

  • assets.update — {"values": {...}}, the fields to set on every asset;
  • work_orders.transition — {"to_status": "...", "reason": "..."};
  • work_orders.priority — {"priority_code": "...", "reason": "..."};
  • work_orders.reschedule — {"planned_start_at": "...", "due_at": "...", "reason": "..."};
  • work_orders.assign — {"worker_id"|"team_id"|"vendor_id": "...", "role": "...", "target": "..."};
  • work_requests.transition — {"to_status": "...", "reason": "..."};
  • maintenance_plans.activate — {}, and maintenance_plans.pause — {"reason": "..."};
  • occurrences.skip — {"reason": "..."}, and occurrences.defer — {"defer_to": "...", "reason": "..."}.

Each is the bulk action of the same name run in chunks, with its arguments. p_view is the register the selection was made on and p_filter its filter, in the same operators the register's own read uses; p_excluded_ids are records unticked after selecting everything. The action's permission and arguments are checked before the job is queued, and each record is checked again as itself when its turn comes. Returns the job as bulk_jobs shows it.

p_action
string<text>
required
p_filter
string<jsonb>
required
p_view
string<text>
required
p_arguments
string<jsonb>
p_excluded_ids
string[]
p_expected_count
integer<integer>

Response

200

OK