only upload documents if api is available
issue