Hello @Disha Bodade ,
welcome to this moderated Azure community forum.
As seen here, you need to provide authentication. This page also references documentation on how to get a Microsoft Entra access token.
I have no experience with the REST api but if you are able to use one of the SDKs, this is highly recommended.
SDKs take away the complexity of eg. authentication and throttling.
Check this blog post about use the SDKs.
This one is written in C# but there are more SDKs available for more programming languages.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.