user101310: I have setup Bitcoin core and trying build an API to fetch all transactions under an address ( not in my wallet ).
Bitcoin core RPC documention says that an address which is not in my wallet needs to be imported. So I did the same using importaddress while setting rescan true e.g. importaddress '35z3Re9SgLHBfeg7y1HdR35t9HrTqTsKFV' 'test' true. It took more than a week to rescan the whole blockchain database. 
After importing the address, when I issued the getaddressinfo RPC command I got empty set of transactions in response.
Am I missing something ? Can you please help me here with the steps ?    

user7272: You can use the scantxoutset command to scan for unspent outputs for a given address (or script). 
Importing an address adds it to your wallet, and you will see transactions for imported addresses under the listreceivedbyaddress and listtransactions commands.

101310: <p>I have setup Bitcoin core and trying build an API to fetch all transactions under an address ( not in my wallet ).</p>

<p><a href="https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/importaddress/" rel="nofollow noreferrer">Bitcoin core RPC documention</a> says that an address which is not in my wallet needs to be imported. So I did the same using <code>importaddress</code> while setting rescan true e.g. <code>importaddress '35z3Re9SgLHBfeg7y1HdR35t9HrTqTsKFV' 'test' true</code>. It took more than a week to rescan the whole blockchain database. </p>

<p>After importing the address, when I issued the <a href="https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/getaddressinfo/" rel="nofollow noreferrer"><code>getaddressinfo</code></a> RPC command I got empty set of transactions in response.</p>

<p>Am I missing something ? Can you please help me here with the steps ?    </p>
 7272: <p>You can use the <code>scantxoutset</code> command to scan for unspent outputs for a given address (or script). </p>

<p>Importing an address adds it to your wallet, and you will see transactions for imported addresses under the <code>listreceivedbyaddress</code> and <code>listtransactions</code> commands.</p>
