How do I get the json response in this scenary?

Hello, Can someone guide me on how do I get this JSON format response in postman? I’m getting a view like HTML as a response in postman. How could I get logging in Postman and then access the URL which belongs to admin permission?
After logging in … when I put the URL on a browser I’m getting the JSON format response… , please.

This is what I got on the browser

This is what I got on postman

This is my controller and my route

How I found the problem:
on postman.

I’ve already tried:
I have set up the basic auth but I’m getting that HTML view.