Manage Spectrum users via RESTful API - examples
search cancel

Manage Spectrum users via RESTful API - examples


Article ID: 116305


Updated On:


CA Spectrum DX NetOps


I have a requirement to automatically manage my users/roles. Can this be leveraged through the REST API? 


Release: All Supported Releases

Component: SPCAPP - Spectrum Applications


The following are some Restful examples for managing Spectrum Users. Using a RESTful client, connect to the OneClick server as per the following URLs.


Create a user by issuing the following as a POST request: 



Delete the user using a DELETE request: 



Associate user with a role using a POST request: 



where 0x10031 = user role association 

Use Spectrum CLI to obtain the User_Role_handles:

cd /vnmsh
./show models | grep -i LicenseRole

User_role_handle is shown in left column:

User roles: 

     0x100016 Operator        0x10453 LicenseRole 

     0x100015 Administrator   0x10453 LicenseRole 

     0x100012 Service Manager 0x10453 LicenseRole 


Create user Group: 



Associate user with group: 



where 0x10022 = Has_Member association 


Get user role: 



Get list of users model handles: 

POST request http://localhost/spectrum/restful/models with the following XML POST body will get you the list of users. 


<?xml version="1.0" encoding="UTF-8"?> 

<rs:model-request throttlesize="5" 



xsi:schemaLocation=" ../../../xsd/Request.xsd "> 



  <rs:search-criteria xmlns=""> 



           <attribute id="AttributeID.MTYPE_HANDLE"> 

                 <value>0x10004</value> <!-- USER -->