Adding a Rule

This RESTful web service request can be used to apply a rule against a specific item.

HTTP Method: POST

REST URL Format:

http://host:port/ibi_apps/rs/ibfs/ItemToBeRestricted

where:

host

Is the name of the system where WebFOCUS is installed.

port

Is the port number used by WebFOCUS.

ItemToBeRestricted

Is the path to the item that is being restricted. For example:

/WFC/Repository/ParentFolder/FolderName

Body Format:

IBIRS_action=addRule&IBIRS_path=ItemToBeRestricted&IBIRS_subjectPath=GroupUser  &IBIRS_verb=RestrictType&IBIRS_role=Role&IBIRS_applyTo=FolderChildren

where:

ItemToBeRestricted

Is the path to the item that is being restricted. For example:

/WFC/Repository/ParentFolder/FolderName

GroupUser

Is the path to a particular group or user ID to which a specific role will be applied. For example:

/SSYS/USERS/userid

RestrictType

Is one of the following types of restrictions that can be applied to a specific role:

Role

Is the specific role that is applied to GroupUser. For example, List, Run, and ListAndRun.

FolderChildren

Determines whether the rule will be applied to only ItemToBeRestricted, ItemToBeRestricted and its children, or just the children. Valid values include:

For example, FOLDER_AND_CHILDREN could be used to apply a rule for a specific folder and its subfolders.

Example:

In the following example, a rule is added to permit the user ID (restid) to list and run items from the Quarterly folder within Financial_Reports, including its subfolders.

POST Request:

http://localhost:8080/ibi_apps/rs/ibfs/WFC/Repository/Financial_Reports/Quarterly

Body:

IBIRS_action=addRule&IBIRS_path=/WFC/Repository/Financial_Reports/
Quarterly&IBIRS_subjectPath=/SSYS/USERS/restid&IBIRS_verb=PERMIT&
IBIRS_role=ListAndRun&IBIRS_applyTo=FOLDER_AND_CHILDREN

Response:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<ibfsrpc _jt="IBFSResponseObject" language="EN" name="addRule" returncode="10000" returndesc="SUCCESS" subreturncode="0" subsystem="SSYS" type="simple">
 <ibfsparams size="5">
  <entry key="IBIRS_verb" value="PERMIT"/>
  <entry key="IBIRS_role" value="ListAndRun"/>
  <entry key="IBIRS_applyTo" value="FOLDER_AND_CHILDREN"/>
  <entry key="IBIRS_subjectPath" value="/SSYS/USERS/restid"/>
  <entry key="IBIRS_" value="/WFC/Repository/Financial_Reports/Quarterly"/>
</ibfsparams>
 <rootObject _jt="IBFSPermissionSetObject" description="List and run content" dummy="false" fullPath="IBFS:/SSYS/ROLES/ListAndRun" 
handle="10330"
     name="ListAndRun" policy="////D///9+f/////f/////////8AAAA=" rsPath="/ibi_apps/rs/ibfs/SSYS/ROLES/ListAndRun" showPermissions="false"
     subsysNameList="WFC" type="PermissionSet">
  <pSet _jt="IBSSPermissionSet" compLvl="0" description="List and run content" id="10330" name="ListAndRun" shipped="true">
   <policy _jt="IBSSPolicy" derivedDate="1348174711335">
    <policy _jt="EnumMap" _keyJT="IBSSOperation" size="2">
     <entry>
      <key _jt="IBSSOperation" name="opList"/>
      <value _jt="IBSSVerb" name="PERMIT"/>
     </entry>
     <entry>
      <key _jt="IBSSOperation" name="opRun"/>
      <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 rule was successfully created.


WebFOCUS