# API question "Secret List"

**URL:** <https://community.doppler.com/t/api-question-secret-list/1665>\
**Category:** Need Help\
**Created:** [November 4, 2024, 8:44am UTC](https://community.doppler.com/t/api-question-secret-list/1665 "2024-11-04T08:44:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikevdBerge](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/mikevdberge/32/376_2.png) [@MikevdBerge](https://community.doppler.com/u/MikevdBerge)\
**Post date:** [November 4, 2024, 8:44am UTC](https://community.doppler.com/t/api-question-secret-list/1665/1 "2024-11-04T08:44:36Z")

</div>

Can you explain me why most of the list methods return an array object.  
E.g Environment, Projects, Configs except Secrets which returns an string object  
Is it possible to have to the Secret List return and array of objects?  
Regards  
Mike

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [November 6, 2024, 6:49pm UTC](https://community.doppler.com/t/api-question-secret-list/1665/2 "2024-11-06T18:49:13Z")

</div>

Hi @MikevdBerge!

With that particular endpoint, the result returns an object to make it easier to work with (e.g., `secrets["SOMETHING"]`) rather than having to search the array for the secret you’re looking for. Granted, there are some situations where this behavior makes it a little less wieldy to use than an array. I ran this by our engineering team and the inconsistency is definitely something we’ll consider changing in the next iteration of our API. For now, it’s unlikely to change though.

Regards,  
-Joel
