Extending @CreeperInATardis answer, that is correct.
multipathd
has following commands that produce JSON:
list|show maps|multipaths json
list|show map|multipath $map json
First one multipathd list multipaths json
lists all multipath devices and prints JSON like this:
# multipathd list multipaths json
{
"major_version": 0,
"minor_version": 1,
"maps": [{
"name" : "mpathi",
"uuid" : "366c4a7405155413030303135933856ef",
"sysfs" : "dm-1",
...
},{
"name" : "mpathaa",
"uuid" : "366c4a7405155413030303135a0b0c10d",
"sysfs" : "dm-2",
...
}]
}
(output is very large so I cut it out)