(Click to open topic with navigation)
This topic provides information on how to modify the application template itself (api/templates/<id>). See 5.193 Modify Template History for information on how to modify the application template's history/version information (api/templates/<history_pk>/history/<version>).
These are the different methods that you can use to modify an application template:
In this topic:
In this section:
PUT /api/templates/<id>/
Parameter | Required | Type | Description | Example |
---|---|---|---|---|
id | Yes | Integer | ID of the application template | 1 |
See 5.186 Create Template for additional parameters you can modify.
You must the correct content type when using the PATCH API. If not specified, the API will consider the type as 'text/html' which might cause side effects in the request processing code.
In this section:
PATCH /api/templates/<id>/
Parameter | Required | Type | Description | Example |
---|---|---|---|---|
id | Yes | Integer | ID of the application template | 1 |
The following table identifies the template attributes that can be changed via a PATCH call.
Name | Required | Type | Description |
---|---|---|---|
published | No | Boolean | Application template's status: published or unpublished; if the application template is unpublished, then only owner can use it (not generally visible) |
This section provides an example of how to update application template 1 with the published tag unset.
PATCH /api/templates/1/
{ "published": false }
{ "url": "http://localhost:8080/api/templates/1/", "assigned": "ALL", "date": "2015-09-01", "id": 1, "name": "My New Name", "owner": "hpotter", "permissions": [ { "name": "ALL", "type": "account" }, { "name": "ALL", "type": "group" }, { "name": "ALL", "type": "user" } ], "published": false, "sections": [ { "name": "defaults", "value": "Basic Job Settings" }, { "name": "timeManagement", "value": "Time Management" }, { "name": "credentials", "value": "Credentials" }, { "name": "resources", "value": "Resources" }, { "name": "dataManagement", "value": "Data Management" }, { "name": "custom", "value": "Custom Settings" }, { "name": "basic", "value": "Basic Settings" }, { "name": "advanced", "value": "Advanced Settings" } ], "use": 0, "widgets": [ { "default_value": "", "editable": true, "label": "Name", "variable_name": "NAME", "visible": true, "properties": [ { "name": "id", "value": "name" } ] }, { "default_value": "0", "editable": true, "label": "Duration", "variable_name": "DURATION", "visible": true, "properties": [ { "name": "id", "value": "duration" } ] }, { "default_value": "", "editable": true, "label": "Job Arrays", "variable_name": "arrays", "visible": true, "properties": [ { "name": "id", "value": "arrays" }, { "name": "enable", "value": "true" }, { "name": "start-value", "value": "0" }, { "name": "end-value", "value": "1" }, { "name": "start-variable", "value": "STARTINDEX" }, { "name": "end-variable", "value": "ENDINDEX" } ] }, { "default_value": "0", "editable": false, "label": "Delay Start By", "variable_name": "ELIGIBLEDATE", "visible": false, "properties": [ { "name": "id", "value": "eligibledate" } ] }, { "default_value": "0", "editable": false, "label": "User Priority", "variable_name": "USERPRIORITY", "visible": false, "properties": [ { "name": "id", "value": "priority" }, { "name": "enable", "value": "false" } ] }, { "default_value": "", "editable": true, "label": "Submission Script", "variable_name": "SCRIPT", "visible": true, "properties": [ { "name": "id", "value": "script" } ] }, { "default_value": "", "editable": true, "label": "Account", "variable_name": "ACCOUNT", "visible": false, "properties": [ { "name": "id", "value": "account" } ] }, { "default_value": "", "editable": true, "label": "Queue / Class", "variable_name": "DESTINATIONQUEUE", "visible": false, "properties": [ { "name": "id", "value": "destinationQueue" } ] }, { "default_value": "", "editable": true, "label": "Quality of Service", "variable_name": "QOS", "visible": false, "properties": [ { "name": "id", "value": "qos" } ] }, { "default_value": "", "editable": true, "label": "Number of Cores", "variable_name": "NUMOFCORES", "visible": true, "properties": [ { "name": "id", "value": "cpupernode" } ] }, { "default_value": "0.5", "editable": true, "label": "Total Memory (GB)", "variable_name": "MEMORYPERNODE", "visible": true, "properties": [ { "name": "id", "value": "memorypernode" } ] }, { "default_value": "", "editable": true, "label": "Architecture", "variable_name": "ARCHITECTURE", "visible": true, "properties": [ { "name": "id", "value": "architecture" } ] }, { "default_value": "", "editable": true, "label": "Execution Path", "variable_name": "EXECUTIONDIRECTORY", "visible": false, "properties": [ { "name": "id", "value": "exedir" } ] }, { "default_value": "", "editable": true, "label": "Error Path", "variable_name": "ERRORPATH", "visible": false, "properties": [ { "name": "id", "value": "errorpath" } ] }, { "default_value": "", "editable": true, "label": "Output Path", "variable_name": "OUTPUTPATH", "visible": false, "properties": [ { "name": "id", "value": "outputpath" } ] }, { "default_value": "false", "editable": false, "label": "Merge Streams", "variable_name": "JOIN", "visible": false, "properties": [ { "name": "id", "value": "join" } ] }, { "default_value": "false", "editable": false, "label": "Hold Job", "variable_name": "HOLD", "visible": false, "properties": [ { "name": "id", "value": "hold" } ] }, { "default_value": "", "editable": false, "label": "Script Shell", "variable_name": "SHELL", "visible": false, "properties": [ { "name": "id", "value": "shell" } ] }, { "default_value": "true", "editable": false, "label": "Moab Environment Variables", "variable_name": "MOABENVIRONMENTVARIABLES", "visible": false, "properties": [ { "name": "id", "value": "moabenvironmentvariables" } ] }, { "default_value": "", "editable": false, "label": "Email Notification List", "variable_name": "MAILLIST", "visible": false, "properties": [ { "name": "id", "value": "maillist" } ] }, { "default_value": "", "editable": false, "label": "Email Options", "variable_name": "EMAILOPTIONS", "visible": false, "properties": [ { "name": "id", "value": "emailoptions" } ] }, { "default_value": "", "editable": false, "label": "Generic Resources", "variable_name": "GENERICRESOURCES", "visible": false, "properties": [ { "name": "id", "value": "genericresources" } ] }, { "default_value": "", "editable": false, "label": "Feature Tags", "variable_name": "FEATURETAGS", "visible": false, "properties": [ { "name": "id", "value": "featuretags" } ] } ] }
Related Topics