Options registered with register_setting() can now appear on /wp/v2/settings, which turns a plugin’s configuration into something an admin interface elsewhere can read and write without a bespoke endpoint.
register_setting( 'shop', 'shop_free_shipping_threshold', array(
'type' => 'integer',
'description' => 'Order total in cents above which shipping is free.',
'default' => 5000,
'show_in_rest' => true,
) );
show_in_rest is the whole switch, and the endpoint requires manage_options, so this is not a way to expose configuration publicly. An option storing an array needs a schema in show_in_rest rather than true, or it is rejected — which is the one place this is fiddlier than it looks.