I guess you can use native Linux commands for this if you don’t use API, you need ifalias
for example in JSON format
vyos@r14# sudo ip --json link show dev eth1
[{"ifindex":4,"ifname":"eth1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"pfifo_fast","operstate":"UP","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"ether","address":"52:54:00:c7:31:bc","broadcast":"ff:ff:ff:ff:ff:ff","ifalias":"TEST"}]
[edit]
vyos@r14#
or something like this
vyos@r14# sudo ip -o -d link show dev eth1 | awk -F'alias ' '{print $2}' | awk '{print $1}'
TEST
[edit]
vyos@r14#