How to get length direction and width direction of datum target area rectangle?

Hi,

I want the length direction and width direction of datum target area rectangle. I have attached the image for reference. Is there any API present to get this information? Please let me know.