“rest_no_route” – Debug error

You should not GET on a POST only rest callback. The code below creates a POST call only

register_rest_route('miningRigs/v1', 'createRig', array(
    'methods' => WP_REST_SERVER::CREATABLE,
    'callback' => 'createMiningRig',
));

Check http://localhost/wordpress-site/wp-json/miningRigs/v1 which shows you can only POST on createRig

I just copy/paste you code + added the https://pressupinc.com/blog/2013/07/minimum-viable-wordpress-plugin/ then enabled the plugin on 4.9.5 and it works like expected on a WP 4.9.5

Leave a Comment