Running a Resource Template

This RESTful web service request can be used to run a resource template, which will create predefined groups, roles, portals, and folders.

For more information on resource templates, see the WebFOCUS Security and Administration content (Chapter 5, WebFOCUS Administration, Understanding Domains topic).

HTTP Method: POST

REST URL Format:

http://host:port/ibi_apps/rs/templates

where:

host

Is the name of the system where WebFOCUS is installed.

port

Is the port number used by WebFOCUS.

Body Format:

IBIRS_action=run&IBIRS_fileName=templateName&IBIRS_vars=object

where:

templateName

Is the name of the resource template in the \WebFOCUSxx\config\resource_templates directory.

Object

Is the XML object defining the name and description of the group, role, portal, and folder that is created from running the template. The XML object uses the following format:

<object _jt="HashMap"><entry><key _jt="string" value="name"/>
<value _jt="string" value="name"/></entry><entry><key _jt="string"
value="desc"/><value _jt="string" value="description"/></entry></object>

where:

name

Is the group, role, portal, and folder name.

description

Is the group, role, portal, and folder description.

Example:

In the following example, a template called EnterpriseDomain is being used, which will create a group and folder. The group and folder that are created will have a name of Sales with a description of Sales Domain.

Request:

http://localhost:8080/ibi_apps/rs/templates

Body:

IBIRS_action=run&IBIRS_fileName=EnterpriseDomain&IBIRS_vars=<object 
_jt="HashMap"><entry><key _jt="string" value="name"/><value _jt="string" 
value="Sales"/></entry><entry><key _jt="string" value="desc"/><value 
_jt="string" value="Sales Domain"/></entry></object>

Response:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ibfsrpc _jt="IBFSResponseObject" language="EN" name="run" returncode="10000" returndesc="SUCCESS" subreturncode="0" subsystem="SSYS" type="simple">
	<ibfsparams size="2">
		<entry key="IBIRS_vars" value="&lt;object _jt=&quot;HashMap&quot;&gt;&lt;entry&gt;&lt;key _jt=&quot;string&quot; value=&quot;name&quot;/&gt;&lt;value _jt=&quot;string&quot; value=&quot;Sales&quot;/&gt;&lt;/entry&gt;&lt;entry&gt;&lt;key _jt=&quot;string&quot; value=&quot;desc&quot;/&gt;&lt;value _jt=&quot;string&quot; value=&quot;Sales Domain&quot;/&gt;&lt;/entry&gt;&lt;/object&gt;"/>
		<entry key="IBIRS_fileName" value="EnterpriseDomain"/>
	</ibfsparams>
	<rootObject _jt="string"/>
</ibfsrpc>

If the value for the returncode attribute in the XML response is 10000, then the template ran successfully.

WebFOCUS

Feedback