I agree, it's sometimes difficult. UI often uses the metric name and the API uses the metric selector which uses the metric keys.
There is a UI menu called Metrics just for that purpose. Unfortunately, it does not allow you to search on all properties, I really would like to see filtering on dimension for example.
Also in the recent Dynatrace versions (I believe, it's from 1.219), there is the ability to use the metric selector directly using the code tab: