The United States has revealed a military attempt to rescue slain journalist James Foley from terrorist group Islamic State in Iraq and the Levant.