Settings Abilities

Implementation: inc/Abilities/SettingsAbilities.php

The datamachine/v1/settings REST routes were retired in #3456. Settings are read and updated through the REST-visible Data Machine abilities, executed through WordPress core’s ability runner:

POST /wp-json/wp-abilities/v1/abilities/datamachine/<slug>/run
Content-Type: application/json

{ "input": { ... } }

The admin Settings page calls these through the shared executeAbility() client (inc/Core/Admin/shared/utils/api.js).

Authentication

Each ability’s permission callback enforces the Data Machine manage_settings capability surface (PermissionHelper::can_manage()). The core ability runner also requires show_in_rest and a valid REST nonce for cookie-authenticated callers.

Response Envelope

The ability runner returns the ability’s output directly. Errors return standard REST error objects (code, message, data.status).

Settings Abilities

Ability slugPurpose
datamachine/get-settingsAll plugin settings, defaults, network settings, and the global tool registry status.
datamachine/update-settingsPartial settings update; unknown keys are ignored.
datamachine/get-scheduling-intervalsInterval options for scheduling UIs (value/label list).
datamachine/get-tool-configConfiguration schema and current values for one tool (tool_id).
datamachine/save-tool-configSave one tool’s config_data.
datamachine/get-handler-defaultsHandler defaults grouped by step type, with config field schemas.
datamachine/update-handler-defaultsReplace defaults for one handler (handler_slug, defaults).
datamachine/generate-ping-secretGenerate and store a new agent ping secret; the secret is returned once.