Deprecated API url for zone analytics dashboard

Hi Cloudflare community,

I am currently trying to build an API that fetches the specific web dashboard analytics (such as the amount of request, threats, etc.). I have created the API token that enable me the access to read the zone logs. The API token has been verified its authenticity and I have tried it with the {https:// api.cloudflare.com/client/v4/zones/{zone_id}} where it successfully listed out the zones that I currently have (Although I have found out that some of the website is not listed).

However I have found out that, currently cloudflare api documentation stated that the current method for accessing the dashboard is deprecated. Whenever I used the {https ://api.cloudflare.com/client/v4/zones/{zone_id}/analytics/traffic} it will return an invalid object identifier error.

Is there any method or api url that able to retrieve the information shown on the dashboard apart from the one deprecated?. Appreciate any help with the issue and do redirect me if the question if duplicated or any resources available online (I have verified and check with support but they have no information on the matter)