Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Universal Controller supports the following RESTful-based web services for Script operations, which are listed alphabetically on this page.

Formatting specifications for each web service, including details about property requirements, are provided.

...


Description

URI

http://host_name/uc/resources/script

HTTP Method

POST

Description

Creates a Script.

Example URI

http://localhost:8080/uc/resources/script

Consumes Content-Type

application/xml, application/json

Produces Content-Type

n/a

Example Request

See Create a Script: Example Request, below.

Example Response

  • Status 200 /OK
    Successfully created the Script with sysId {sysId}.
  • Status 400 /Bad Request
    Create Script failed. A duplicate value has been detected. Name must be unique.

Script Properties

See Create a Script: Script Properties, below.

Notes Properties

See Create a Script: Notes Properties, below.

...

<ul> <li> If <b>retainSysIds</b>
  • If retainSysIds="true"
and <code>sysId</code> is included in the
  • and sysId is included in the request/response,
<code>sysId</code> will be persisted to the database. <li> If <b>retainSysIds</b>
  •  sysId will be persisted to the database.
  • If retainSysIds="false"
and <code>sysId</code> is included in the
  • and sysId is included in the request/response,
<code>sysId</code> will be
  •  sysId will be ignored;
  • it
  • will
  • be
  • autogenerated
  • by
  • the
  • Controller.
</ul>

Property

UI Field Name

Description

Specifications

Required

Anchor
content - SCR
content - SCR
content

Content

Content of the script or SAP definition file.


Y

Anchor
description - SCR
description - SCR
description

Description

User-defined; description of this record.


N

Anchor
excludeRelated - SCR
excludeRelated - SCR
excludeRelated

n/a

Specification for whether or not to exclude related records (Notes) from an update, even if they are provided in the request.

Valid values: true/false (default is false).

N

Anchor
exportReleaseLevel - SCR
exportReleaseLevel - SCR
exportReleaseLevel

n/a

Universal Controller release that the record was exported from.

read onlyN

Anchor
exportTable - SCR
exportTable - SCR
exportTable

n/aRecord table information.read onlyN

Anchor
opswiseGroups - SCR
opswiseGroups - SCR
opswisewGroups

Member of Business Services

Business Services that this record belongs to.
 
XML

Panel


Html bobswift
<pre>
&lt;opswiseGroups&gt;
      &lt;opswiseGroup&gt;group1&lt;/opswiseGroup&gt;
      &lt;opswiseGroup&gt;group2&lt;/opswiseGroup&gt;
&lt;/opswiseGroups&gt;
</pre>


 
JSON

Panel


Html bobswift
<pre>
"opswiseGroups": ["group1","group2"]
</pre>




N

Anchor
resolveVariables - SCR
resolveVariables - SCR
resolveVariables

Resolve UAC Variables

Controls whether or not the Script will be parsed in pursuit of Universal Controller variables. It allows the Controller to avoid the overhead of parsing a Script that does not contain variables.


N

Anchor
retainSysIds - SCR
retainSysIds - SCR
retainSysIds

n/a

Specification for whether or not the Create a Script web service will persist the sysId property.

Html bobswift
Note
titleNote

In XML web services, retainSysIds is specified as an attribute in the <script> element.


Valid values: true/false (default is true).

N

Anchor
scriptName - SCR
scriptName - SCR
scriptName

Script Name

Name of the script.

This name can be the same as the name of the script file.
 
You also can specify a file extension; the default file extension for Windows is .bat.
 
If the name has the extension .ps1, Windows will run the script as a powershell script.
 
You may have to create the appropriate file association and security for this to work.

Y

Anchor
scriptType - SCR
scriptType - SCR
scriptType

Script Type

Type of Script

Valid Values:

Html bobswift<ul> <li>
  • As
  • String
  • =
  • Script,
  • As
  • Value
  • =
  • 1
  • (for
  • use
  • in
  • Windows
  • or
  • Linux/Unix
  • tasks)
<li>
  • As
  • String
  • =
  • SAP
  • Definition,
  • As
  • Value
  • =
  • 2
  • (for
  • use
  • in
  • SAP
  • tasks)
<li>
  • As
  • String
  • =
  • UDM
  • Script,
  • As
  • Value
  • =
  • 3
  • (for
  • use
  • in
  • UDM
  • File
  • Transfer
  • tasks)
<li>
  • As
  • String
  • =
  • Web
  • Service
  • Payload,
  • As
  • Value
  • =
  • 4
  • (for
  • use
  • in
  • Web
  • Service
  • tasks)
<li>
  • As
  • String
  • =
  • Data,
  • As
  • Value
  • =
  • 5
  • (for
  • use
  • in
  • a
  • script
  • or
  • task)
</ul>

Default is Script (1).

N

Anchor
sysId - SCR
sysId - SCR
sysId

n/a

System ID field in the database for this Script record.

Persisted only if retainSysIds is set to true.

N

...