Welcome to the Jazz Community Forum
On RM/DNG, how to get all the artifacts details like primary text and other attributes using REST API

One answer

Assuming you're using the DNG Reportable REST API, that's probably the best way to get content of a view.
2000 artifacts is a lot of data - your API call will be putting a load on the server, which you need to do carefully/sensitively so as not to affect other interactive/API users.
Comments

@ianbarnard, Could you please share the reporting api endpoint to fetch view info

See the entry point for ELM APIs here ELMProductAPILanding < Deployment < TWiki
Look for Reportable REST API below the heading Engineering Requirements Management DOORS Next (DN)