I wonder if it works normally once you’ve temporary enable the “Pause Cloudflare for this Website” option from the Cloudflare dashboard → Overview → bottom right corner.
Then, I am afraid Cloudflare doesn’t affect or change anything here.
404’s should be handled and troubleshooted at the origin host/server.
I’d suggest you to try to talk with your hosting provider for further troubleshooting.
Might be some security plugin restricted access to the particular /wp-json/ path, resulting in 404 you’re getting.