This RESTful web service request can be used to add a role and define the privileges that are associated with the role.
HTTP Method: POST
REST URL Format:
http://host:port/ibi_apps/rs/ibfs/SSYS/ROLES/Role
where:
Is the name of the system where WebFOCUS is installed.
Is the port number used by WebFOCUS.
Is the name of the role to be added.
Body Format:
IBIRS_action=put&IBIRS_object=Object
where:
Is the XML object that defines the privileges associated with the role.
This XML object must have the following structure:
<object _jt="IBFSPermissionSetObject" description="RoleDescription" showPermissions="true" subsysNameList="Subsystem" type="PermissionSet"> <pSet _jt="IBSSPermissionSet" compLvl="100" shipped="true"> <policy _jt="IBSSPolicy"> <policy _jt="EnumMap" _keyJT="IBSSOperation"> <entry> <key _jt="IBSSOperation" name="Privilege1"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> <entry> <key _jt="IBSSOperation" name="Privilege2"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> </policy> </policy> <subsysList _jt="ArrayList"> <item _jt="IBFSSubsystem" index="0" name="Subsystem"/> </subsysList> </pSet> </object>
where:
Is the description of the role.
Is the subsystem associated with the role. Valid values include:
Is the privilege name that is a associated with the role. Each privilege is assigned within the opening and closing Entry tags. For a list of valid privileges, see Listing Privileges.
Example:
In the following example, a role called LibraryCustom is added. The description for the role is Library Privilege - Custom. The subsystem that the role is associated with is WFC. The privileges assigned to this role are opLibrary, opList, opDisplayVersionInfo, opRCExplorer, opPortalAccess, and opBidRunTime.
Request:
http://localhost:8080/ibi_apps/rs/ibfs/SSYS/ROLES/LibraryCustom
Body:
IBIRS_action=put&object=<object _jt="IBFSPermissionSetObject" description="Library Privilege - Custom" showPermissions="true" subsysNameList="WFC" type="PermissionSet"> <pSet _jt="IBSSPermissionSet" compLvl="100" shipped="true"> <policy _jt="IBSSPolicy"> <policy _jt="EnumMap" _keyJT="IBSSOperation"> <entry> <key _jt="IBSSOperation" name="opLibrary"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> <entry> <key _jt="IBSSOperation" name="opList"/> <value _jt="IBSSVerb" name="PERMIT"/>
</entry> <entry> <key _jt="IBSSOperation" name="opDisplayVersionInfo"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> <entry> <key _jt="IBSSOperation" name="opRCExplorer"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> <entry> <key _jt="IBSSOperation" name="opPortalAccess"/> <value _jt="IBSSVerb" name="DENY"/> </entry> <entry> <key _jt="IBSSOperation" name="opBidRunTime"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> </policy> </policy> <subsysList _jt="ArrayList"><item _jt="IBFSSubsystem" index="0" name="WFC"/></subsysList> </pSet> </object>
Response:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> <ibfsrpc _jt="IBFSResponseObject" language="EN" name="put" returncode="10000" returndesc="SUCCESS" subreturncode="0" subsystem="SSYS" type="simple"> <ibfsparams size="5"> <entry key="IBIRS_replace" value="true"/> <entry key="IBIRS_private" value="__null"/> <entry key="IBIRS_object" value="<object _jt="IBFSPermissionSetObject" description="Library Privilege - Custom" showPermissions="true" subsysNameList="WFC" type="PermissionSet"> <pSet _jt="IBSSPermissionSet" compLvl="100" shipped="true"> <policy _jt="IBSSPolicy"> <policy _jt="EnumMap" _keyJT="IBSSOperation"> <entry><key _jt="IBSSOperation" name="opLibrary"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> <entry><key _jt="IBSSOperation"
name="opList"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> <entry><key _jt="IBSSOperation" name="opDisplayVersionInfo"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> <entry><key _jt="IBSSOperation" name="opRCExplorer"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> <entry><key _jt="IBSSOperation" name="opPortalAccess"/> <value _jt="IBSSVerb" name="DENY"/> </entry> <entry><key _jt="IBSSOperation" name="opBidRunTime"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> </policy> </policy> <subsysList _jt="ArrayList"><item _jt="IBFSSubsystem" index="0" name="WFC"/></subsysList> </pSet> </object> "/> <entry key="IBIRS_args" value="__null"/> <entry key="IBIRS_" value="/SSYS/ROLES/LibraryCustom"/> </ibfsparams> <rootObject _jt="IBFSPermissionSetObject" description="Library Privilege - Custom" dummy="false" fullPath="IBFS:/SSYS/ROLES/LibraryCustom" name="LibraryCustom" policy="////D///9+f/////f/////////8AAAA=" rsPath="/ibi_apps/rs/ibfs/SSYS/ROLES/LibraryCustom" showPermissions="false" subsysNameList="WFC" type="PermissionSet"> <pSet _jt="IBSSPermissionSet" compLvl="100" description="Library Privilege - Custom" name="LibraryCustom" shipped="false"> <policy _jt="IBSSPolicy" derivedDate="1349168261272"> <policy _jt="EnumMap" _keyJT="IBSSOperation" size="3"> <entry> <key _jt="IBSSOperation" name="opLibrary"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> <entry>
<key _jt="IBSSOperation" name="opList"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> <entry> <key _jt="IBSSOperation" name="opRCExplorer"/> <value _jt="IBSSVerb" name="PERMIT"/> </entry> </policy> </policy> <subsysList _jt="ArrayList" size="1"> <item _jt="IBFSSubsystem" index="0" name="WFC"/> </subsysList> </pSet> </rootObject> </ibfsrpc>
If the value for the returncode attribute in the XML response is 10000, then the role was successfully added.
WebFOCUS |