Script Web Services
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.
Create a Script
| Description |
|---|---|
URI | |
HTTP Method | POST |
Description | Creates a Script. |
Example URI | |
Consumes Content-Type | application/xml, application/json |
Produces Content-Type | n/a |
Example Request | See Create a Script: Example Request, below. |
Example Response |
|
Script Properties | See Create a Script: Script Properties, below. |
Notes Properties | See Create a Script: Notes Properties, below. |
Create a Script: Example Request
XML Request | JSON Request |
|---|---|
<script retainSysIds="true">
<content>echo %*</content>
<description>description</description>
<notes>
<note>
<sysId>a8756a120a00010357097d05fa5c558e</sysId>
<text>test</text>
<title>note 1</title>
</note>
</notes>
<opswiseGroups>
<opswiseGroup>1</opswiseGroup>
<opswiseGroup>2</opswiseGroup>
</opswiseGroups>
<resolveVariables>false</resolveVariables>
<scriptName>test.bat</scriptName>
<scriptType>Script</scriptType>
<sysId>f8756a120a00010357097d05fa5c558e</sysId>
</script> | {
"content": "echo",
"description": "description",
"notes": [ {
"sysId": "a8756a120a00010357097d05fa5c558e",
"text": "test",
"title": "note"
} ],
"opswiseGroups": ["1","2"],
"resolveVariables": false,
"retainSysIds": true,
"scriptName": "test.bat",
"scriptType": "Script",
"sysId": "f8756a120a00010357097d05fa5c558e"
} |
Create a Script: Script Properties
Property | UI Field Name | Description | Specifications | Required |
|---|---|---|---|---|
| Content | Content of the script or SAP definition file. |
| Y |
| Description | User-defined; description of this record. |
| N |
| 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 |
| n/a | Universal Controller release that the record was exported from. | read only | N |
| n/a | Record table information. | read only | N |
| Member of Business Services | Business Services that this record belongs to.
|
| N |
| 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 |
| n/a | Specification for whether or not the Create a Script web service will persist the sysId property.
Note In XML web services, | Valid values: true/false (default is true). | N |
| Script Name | Name of the script. | This name can be the same as the name of the script file. | Y |
| Script Type | Type of Script | Valid Values:
Default is Script (1). | N |
| n/a | System ID field in the database for this Script record. | Persisted only if retainSysIds is set to true. | N |
Create a Script: Notes Properties
Delete a Script
| Description |
|---|---|
URI | |
HTTP Method | DELETE |
Description | Deletes a Script. |
URI Parameters | See Delete a Script: URI Parameters, below. |
Example URI | |
Example Response |
|
Delete a Script: URI Parameters
Parameter | Description | Specifications | Required | Mutually Exclusive With |
|---|---|---|---|---|
| ID used within the Controller to identify this Script. | String; URI parameter. | Y |
|
| Name used within the Controller to identify this Script. | String; URI parameter. | Y |
|
List Scripts
| Description |
|---|---|
URI | |
HTTP Method | GET |
Description | Retrieves information on all Scripts. |
Example URI | |
Authentication | HTTP Basic |
Consumes Content-Type | n/a |
Produces Content-Type | application/xml, application/json |
Example Response | See List Scripts: Example Response, below. |
Script Properties | |
Notes Properties |
List Scripts: Example Response
<scripts>
<script exportReleaseLevel="7.2.0.0" exportTable="ops_script" version="2">
<content>echo %*</content>
<description>description</description>
<notes>
<note>
<sysId>a8756a120a00010357097d05fa5c558e</sysId>
<text>test</text>
<title>note 1</title>
</note>
</notes>
<opswiseGroups>
<opswiseGroup>group1</opswiseGroup>
<opswiseGroup>group2</opswiseGroup>
</opswiseGroups>
<resolveVariables>false</resolveVariables>
<scriptName>test.bat</scriptName>
<scriptType>Script</scriptType>
<sysId>f8756a120a00010357097d05fa5c558e</sysId>
</script>
<script exportReleaseLevel="7.2.0.0" exportTable="ops_script" version="3">
<content>echo ?*</content>
<description>description</description>
<notes>
<note>
<sysId>a8756a120a00010357097d05fa5c558f</sysId>
<text>test</text>
<title>note 1</title>
</note>
</notes>
<opswiseGroups>
<opswiseGroup>group1</opswiseGroup>
<opswiseGroup>group2</opswiseGroup>
</opswiseGroups>
<resolveVariables>false</resolveVariables>
<scriptName>test2.bat</scriptName>
<scriptType>Script</scriptType>
<sysId>f8756a120a00010357097d05fa5c558f</sysId>
</script>
</scripts>
| [
{
"content": "echo",
"description": "description",
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_script",
"notes": [ {
"sysId": "a8756a120a00010357097d05fa5c558e",
"text": "test",
"title": "note"
} ],
"opswiseGroups": ["group1","group2"],
"resolveVariables": false,
"scriptName": "test.bat",
"scriptType": "Script",
"sysId": "f8756a120a00010357097d05fa5c558e",
"version": 2
},
{
"content": "echo",
"description": "description",
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_script",
"notes": [ {
"sysId": "a8756a120a00010357097d05fa5c558f",
"text": "test",
"title": "note"
} ],
"opswiseGroups": ["group1","group2"],
"resolveVariables": false,
"scriptName": "test2.bat",
"scriptType": "Script",
"sysId": "f8756a120a00010357097d05fa5c558f",
"version": 3
}
]
|
Modify a Script
| Description |
|---|---|
URI | |
HTTP Method | PUT |
Description | Modifies the Script specified by the |
Example URI | |
Consumes Content-Type | application/xml, application/json |
Produces Content-Type | n/a |
Example Request | See Modify a Script: Example Request, below. |
Script Properties | |
Notes Properties | |
Example Response |
|
Modify a Script: Example Request
XML Request | JSON Request |
|---|---|
<script retainSysIds="true">
<content>echo %*</content>
<description>description</description>
<notes>
<note>
<sysId>a8756a120a00010357097d05fa5c558e</sysId>
<text>test</text>
<title>note 1</title>
</note>
</notes>
<opswiseGroups>
<opswiseGroup>1</opswiseGroup>
<opswiseGroup>2</opswiseGroup>
</opswiseGroups>
<resolveVariables>false</resolveVariables>
<scriptName>test.bat</scriptName>
<scriptType>Script</scriptType>
<sysId>f8756a120a00010357097d05fa5c558e</sysId>
</script> | {
"content": "echo",
"description": "description",
"notes": [ {
"sysId": "a8756a120a00010357097d05fa5c558e",
"text": "test",
"title": "note"
} ],
"opswiseGroups": ["1","2"],
"resolveVariables": false,
"retainSysIds": true,
"scriptName": "test.bat",
"scriptType": "Script",
"sysId": "f8756a120a00010357097d05fa5c558e"
} |
Read a Script
URI | |
HTTP Method | GET |
Description | Retrieves information on a specific Script. |
URI Parameters | See Read a Script: URI Parameters, below. |
Example URI | |
Example Response | See Read a Script: Example Response, below. |
Script Properties | |
Notes Properties |
Read a Script: URI Parameters
Parameter | Description | Specifications | Required | Mutually Exclusive With |
|---|---|---|---|---|
| ID used within the Controller to identify this Script. | String; URI parameter. | Y |
|
| Name used within the Controller to identify this Script. | String; URI parameter. | Y |
|
Read a Script: Example Response
<script exportReleaseLevel="7.2.0.0" exportTable="ops_script" retainSysIds="true" version="1">
<content>echo %*</content>
<description>description</description>
<notes>
<note>
<sysId>a8756a120a00010357097d05fa5c558e</sysId>
<text>test</text>
<title>note 1</title>
</note>
</notes>
<opswiseGroups>
<opswiseGroup>group1</opswiseGroup>
<opswiseGroup>group2</opswiseGroup>
</opswiseGroups>
<resolveVariables>false</resolveVariables>
<scriptName>test.bat</scriptName>
<scriptType>Script</scriptType>
<sysId>f8756a120a00010357097d05fa5c558e</sysId>
</script>
| {
"content": "echo",
"description": "description",
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_script",
"notes": [ {
"sysId": "a8756a120a00010357097d05fa5c558e",
"text": "test",
"title": "note"
} ],
"opswiseGroups": ["group1","group2"],
"resolvableVariables": false,
"retainSysIds": true,
"scriptName": "test.bat",
"scriptType": "Script",
"sysId": "f8756a120a00010357097d05fa5c558e",
"version": 2
}
|