All supported DX NetOps Spectrum releases
Out of the Box there are no direct APIs for this. A new one would require an RFE submitted to Product Management for a new feature.
The sample commands shown below are based off this User hierarchy in Spectrum.
Open a terminal on the SpectroSERVER to query.
Go to the $SPECROOT/vnsmh directory. Log in to the Spectrum CLI using the command "./connect". Sample output after entering vnmsh CLI:
[spectrum@ss vnmsh]$ ./connect
Starting CLI Local Server VnmShd
SPECTRUM Command Line Interface 24.3.5.000
Copyright 2025 CA Technologies, A Broadcom Company All Rights Reserved
CA Technologies, A Broadcom Company
One CA Plaza
Islandia, NY 11749 USA
+1 (800) 225-5224
connect: successful ss
current landscape is 0x1000000
WARNING: CLI is a powerful tool that allows a user to make changes
directly to the SPECTRUM knowledge-base without the error checking
provided by OneClick. Please read the accompanying CLI user
documentation before using the create, destroy, or update commands.
[spectrum@ss vnmsh]$
To get all users use mth=0x10004. The command is "./show models mth=0x10004". Sample output.
[spectrum@ss vnmsh]$ ./show models mth=0x10004
MHandle MName MTypeHnd MTypeName
0x1012c5c test12345(Active) 0x10004 User
0x1012c5a test(Active) 0x10004 User
0x100c995 UserA(Active) 0x10004 User
0x1000354 UserB(Active) 0x10004 User
0x1000349 UserC(Active) 0x10004 User
0x1000063 spectrum(Active) 0x10004 User
[spectrum@ss vnmsh]$
To get all user groups use mth=0x1040a. The command is "./show models mth=0x1040a". Sample output.
[spectrum@ss vnmsh]$ ./show models mth=0x1040a
MHandle MName MTypeHnd MTypeName
0x1000352 pmspec 0x1040a UserGroup
[spectrum@ss vnmsh]$
To get users in a group use the group Model_Handle (Ex: 0x1000352 is a group model handle above). The command is "./show children mh=0x1000352". Sample output.
[spectrum@ss vnmsh]$ ./show children mh=0x1000352
MHandle MName MTypeHnd MTypeName Relation
0x1000349 UserC 0x10004 User Has_Member
0x1000354 UserB 0x10004 User Has_Member
0x1000353 UserGroup-pmspec-671683d5-fe68-1 0x10475 AccessGroup HasAccessGroup
[spectrum@ss vnmsh]$
To get the group a user is a member part use the user model handle (Ex: 0x1000349 is UserC users Model_Handle value). The command is "./show parents mh=0x1000349". Sample output.
[spectrum@ss vnmsh]$ ./show parents mh=0x1000349
MHandle MName MTypeHnd MTypeName Relation
0x1000006 Repair 0x10371 Repair_Entity Can_Assign
0x1000352 pmspec 0x1040a UserGroup Has_Member
0x1000013 Service Manager 0x10453 LicenseRole UserRole
0x1000016 Administrator 0x10453 LicenseRole UserRole
0x1000017 Operator 0x10453 LicenseRole UserRole
[spectrum@ss vnmsh]$