Is there a way to get distinct list of custom attribute values?

Hi All,
There is an attribute that I have saved for every user. And from one of my integrations, I am trying to fetch values list of the particular attribute.
Will there be any direct API for this? or do I have to get the full users list and, filter the and identify the list of distinct values?