Fleet server API

Hello everyone,
I have a Fleet server that I manually installed on a Linux server.
I am trying to follow the instructions from the Elastic documentation to use the API options (Fleet APIs | Fleet and Elastic Agent Guide [8.15] | Elastic), but every time I get a "404 page not found" error in response.
For example, I make GET request in the following way:
https://my-fleet-server:8220/agent_status

What could be the issue?

The request needs to be done to Kibana, not directly to the Fleet Server.

Check this documentation with an example.

Thank you very much for the response, it really worked.
Do I have the option to add queries to retrieve, for example, only the agents in an offline status or request specific information?
Example:

https://my-kibana-server:5601/api/fleet/agent_status?status=offline

I think the correct API to check the status is
[ https://fleet-server:8220/api/status ] & in response it returns name of server & its status.