Adapted take api snapshot to work