How to retrive file if i know commit hash using API?

How to retrive file if i know commit hash using API?

So I have commit hashes from file I created. Now I would like to use hash I pick to get file that it belongs to from API. Is this possible?

Thanks for help.