You can use the api/template endpoint to post with a body like this to give you name and state. Add to the template for other attributes needed.
{"template" :
"{% set data = namespace(entities=[]) %}{% for entity in integration_entities('sun') %}{% set e = {'name': entity, 'state': states(entity)} %}{% set data.entities = data.entities + [e] %}{% endfor %}{{data.entities}}"
}
EDIT: Obviously change the integration name in the template