Is there a way to get the legends of an AGOL hosted feature layer by calling a url, and have the legend returned in a JSON? In ArcGIS Map Services that can be done by appending /legend to the url.
I don't believe this functionality is available for Feature services, just Map Image and Image services.
Feature services, unlike Map Image services, send geometries over to the client for rendering. This lends the default symbology to be overridden by the client. This might be why the REST api doesn't place importance on the default legend.