I found a solution:
function myAction() {
if(defined("REST_REQUEST") && REST_REQUEST) {
return;
}
// Do action stuff
}
The request to /wp-json/wp/v2/pages/1373
is a request to the API which defines the constant REST_REQUEST
and sets it to true.
If anyone’s got an idea why an extra API request is sent, please feel free to add you answer.