Minor - adding api_get_cidreq().
Fixing double resursive in delete_document function see BT#7870