How Can Law Be Enforced Against the Executive?

The nonpartisan Government Accountability Office concluded that the Obama administration violated a “clear and unambiguous law.”

A recent post to the Volokh Conspiracy blog argues that a 2014 prisoner swap was blatantly illegal, in violation of a statute requiring that Congress be given thirty days advance notice of such an action. What interests me about it is not whether the claim is correct but, if it is correct, what ought to be done about it. More generally, how can either statutory or Constitutional restrictions be enforced against the executive branch?In the case of an ongoing action, the obvious answer is that opponents can ask the courts to block it. Examples would be the various suits, past and present, over Obamacare, and Obama's policy on illegal aliens. But what about an action which is already over at the point when opponents learn of it—as was apparently true of the case that the post deals with?The usual solution to that problem, in both tort law and criminal law, is to punish the tortfeasor or criminal. But government officials are not usually held liable for obeying the orders of their superiors, which shifts the responsibility to the President. If the violation is sufficiently serious, he can be impeached—the President of Brazil is currently threatened with impeachment for spending very large amounts of money in ways alleged to have been in violation of Brazilian law. But it's hard to argue that the particular case alleged reaches the level of “treason, bribery, and other high crimes and misdemeanors.”One problem is that the responsibility is on the President, who is effectively immune from any sanction short of impeachment. Another is that all crimes are treated as offenses against the government, prosecution is by the executive arm of government, hence crimes that the head of the executive arm approves of are unlikely to be prosecuted. That is the same issue that arises in the very different context of offenses by police. Solutions? Either in current law or in ways one could imagine altering it?