Hi,
I need to export a list of all network and service groups' members by name, and am running into some issues doing that via the API.
When I get the information from a group, it returns the members' UIDs, as such:
{
'uid':'80dccaca-b24b-437c-8bf9-3db51369ba45',
'name':'xxxxxxxxxxxx.com_subnets',
'type':'group',
'domain':{
'uid':'41e821a0-3720-11e3-aa6e-0800200c9fde',
'name':'SMC User',
'domain-type':'domain'
},
'members':[
'475841b2-bccf-4b77-984a-7d2152dfbf97',
'5cc36867-b259-4708-897f-0741b8de4910',
'27d3f6ec-d566-4586-ad48-f7e8df3f70b3',
'98cffe2e-1d61-454e-9986-e2566e561c8f',
'7d5bad99-8303-427e-8dff-b0de0a7fd459',
],
'comments':'',
'color':'black',
'icon':'General/group',
'tags':[
],
'meta-info':{
'lock':'unlocked',
'validation-state':'ok',
'last-modify-time':{
'posix':1617023570975,
'iso-8601':'2021-03-29T09:12-0400'
},
'last-modifier':'user',
'creation-time':{
'posix':1599654745782,
'iso-8601':'2020-09-09T08:32-0400'
},
'creator':'user'
},
'read-only':False
}
Now, if all objects that could be within a group were objects of the same type, that would be great. However, since that is not the case, and for example, in a network group, I could have host, network, IP Range or gateway objects, I do not know which one to search for a UID match. That makes it so I need to go through all object types to find the UID and a matching object name, which is definitely not efficient.
Is there a way to search the entire database by UID in order to get the corresponding object?
Thanks in advance for you help!