4.20
Get All Templates
In this topic:
GET /api/templates/
Parameter | Required | Type | Description | Example |
---|---|---|---|---|
page_size | No | Integer |
Specifies count of application templates per page. |
page_size=3 |
page | No | Integer | Specifies number of page. | page=2 |
Parameter | Required | Type | Description | Example |
---|---|---|---|---|
name | No | String | Specifies name of application template for filtering | name=Free Form
name__contains=foo name__icontains=foo name_startswith=foo |
current | No | Boolean | Specifies whether only the current version for the application templates is included in the filtering | current=True |
type | No | String | Specify the application template type to include in the filtering | type=array |
owner | No | String | Specifies the owner's name for filtering | owner=moab-foo
owner__contains=moab owner__icontains=foo owner__startswith=foo owner_ne=foo
|
published | No | Boolean | Specifies the published status of the application template for filtering | published=True |
permissions__user__name__in | No | List | Specifies the list of users that the application template should contain | permissions__user__name__in=hpotter,hgranger |
permissions__group__name__in | No | List | Specifies the list of groups that the application template should contain | permissions__group__name__in=hpotter,hgranger |
permissions__account__name__in | No | List | Specifies the list of accounts that the application template should contain | permissions__account__name__in=DEFAULT,QA |
date__gte | No | Date | Specifies the date before which the application template was created | date__gte=2015-09-01 |
date__lte | No | Date | Specifies the date after which the application template was created | date__lte=2015-09-16 |
GET /api/templates/?page_size=1&published=True
Response
{ "count": 1, "next": null, "previous": null, "results": [ { "url": "http://localhost:8080/api/templates/5/", "history_url": "http://localhost:8080/api/templates/b00ce08c-01ed-4a9d-a916-f587b9f1af44/history/", "changed_by": "moab-admin", "current": true, "date": "2016-09-08T12:14:19.647410Z", "id": 5, "name": "Free Form", "type": "regular", "description": { "text": "<h1><strong>Welcome to our Free Form</strong> Application Template!</h1>\n\n<p>Fill in the inputs and press the "Create" button to submit your job!</p>\n\n<p>-- Enjoy!</p>", "visible": true }, "owner": "moab-admin", "permissions": [ { "name": "ALL", "type": "account" }, { "name": "ALL", "type": "group" }, { "name": "ALL", "type": "user" } ], "published": true, "sections": [ { "name": "description", "value": "Application Description" }, { "name": "advanced", "value": "Advanced Settings" }, { "name": "basic", "value": "Basic Settings" }, { "name": "custom", "value": "Custom Settings" }, { "name": "dataManagement", "value": "Data Management" }, { "name": "resources", "value": "Resources" }, { "name": "credentials", "value": "Credentials" }, { "name": "timeManagement", "value": "Time Management" }, { "name": "defaults", "value": "Basic Job Settings" } ], "use": 0, "widgets": [ { "default_value": "ggg", "editable": true, "label": "Name", "variable_name": "NAME", "visible": true, "properties": [ { "name": "id", "value": "name" }, { "name": "enable", "value": "true" } ] }, { "default_value": "0", "editable": true, "label": "Duration", "variable_name": "DURATION", "visible": true, "properties": [ { "name": "id", "value": "duration" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": false, "label": "Job Arrays", "variable_name": "arrays", "visible": false, "properties": [ { "name": "id", "value": "arrays" }, { "name": "enable", "value": "false" }, { "name": "start-value", "value": "0" }, { "name": "end-value", "value": "1" }, { "name": "start-variable", "value": "STARTINDEX" }, { "name": "end-variable", "value": "ENDINDEX" } ] }, { "default_value": "0", "editable": true, "label": "Delay Start By", "variable_name": "ELIGIBLEDATE", "visible": true, "properties": [ { "name": "id", "value": "eligibledate" }, { "name": "enable", "value": "true" } ] }, { "default_value": "0", "editable": false, "label": "User Priority", "variable_name": "USERPRIORITY", "visible": false, "properties": [ { "name": "id", "value": "priority" }, { "name": "enable", "value": "true" } ] }, { "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": true, "properties": [ { "name": "id", "value": "account" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Queue / Class", "variable_name": "DESTINATIONQUEUE", "visible": true, "properties": [ { "name": "id", "value": "destinationQueue" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Quality of Service", "variable_name": "QOS", "visible": true, "properties": [ { "name": "id", "value": "qos" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Number of Cores", "variable_name": "NUMOFCORES", "visible": true, "properties": [ { "name": "id", "value": "cpupernode" }, { "name": "totalamount", "value": "True" }, { "name": "nodeswithcount", "value": "True" }, { "name": "malleablecorecount", "value": "False" }, { "name": "totalamount_editable", "value": "False" }, { "name": "nodeswithcount_editable", "value": "False" }, { "name": "malleablecorecount_editable", "value": "False" }, { "name": "totalamount_visible_default", "value": "True" }, { "name": "nodeswithcount_visible_default", "value": "False" }, { "name": "malleablecorecount_visible_default", "value": "False" }, { "name": "totalcores_default", "value": "1" }, { "name": "totalnodes_default", "value": "1" }, { "name": "corespernode_default", "value": "1" }, { "name": "minimumcores_default", "value": "1" }, { "name": "maximumcores_default", "value": "2" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Total Memory (GB)", "variable_name": "MEMORYAMOUNT", "visible": true, "properties": [ { "name": "id", "value": "memorypernode" }, { "name": "totalmemory", "value": "True" }, { "name": "memorypercore", "value": "True" }, { "name": "totalmemory_visible_default", "value": "True" }, { "name": "memorypercore_visible_default", "value": "True" }, { "name": "totalmemory_default", "value": "0.5" }, { "name": "memorypercore_default", "value": "0.5" }, { "name": "totalmemory_editable", "value": "False" }, { "name": "memorypercore_editable", "value": "False" }, { "name": "enable", "value": "true" } ] }, { "default_value": "linux", "editable": true, "label": "Architecture", "variable_name": "ARCHITECTURE", "visible": true, "properties": [ { "name": "id", "value": "architecture" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Execution Path", "variable_name": "EXECUTIONDIRECTORY", "visible": true, "properties": [ { "name": "id", "value": "exedir" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Error Path", "variable_name": "ERRORPATH", "visible": true, "properties": [ { "name": "id", "value": "errorpath" }, { "name": "useExecutionPath", "value": "True" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Output Path", "variable_name": "OUTPUTPATH", "visible": true, "properties": [ { "name": "id", "value": "outputpath" }, { "name": "useExecutionPath", "value": "True" }, { "name": "enable", "value": "true" } ] }, { "default_value": "false", "editable": true, "label": "Merge Streams", "variable_name": "JOIN", "visible": true, "properties": [ { "name": "id", "value": "join" }, { "name": "enable", "value": "true" } ] }, { "default_value": "false", "editable": true, "label": "Hold Job", "variable_name": "HOLD", "visible": true, "properties": [ { "name": "id", "value": "hold" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Script Shell", "variable_name": "SHELL", "visible": true, "properties": [ { "name": "id", "value": "shell" }, { "name": "enable", "value": "true" } ] }, { "default_value": "true", "editable": true, "label": "Moab Environment Variables", "variable_name": "MOABENVIRONMENTVARIABLES", "visible": true, "properties": [ { "name": "id", "value": "moabenvironmentvariables" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Email Notification List", "variable_name": "MAILLIST", "visible": true, "properties": [ { "name": "id", "value": "maillist" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Email Options", "variable_name": "EMAILOPTIONS", "visible": true, "properties": [ { "name": "id", "value": "emailoptions" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Generic Resources", "variable_name": "GENERICRESOURCES", "visible": true, "properties": [ { "name": "id", "value": "genericresources" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": true, "label": "Job Environment Variables", "variable_name": "Job Environment Variables", "visible": true, "properties": [ { "name": "id", "value": "jobEnvVariables" }, { "name": "enable", "value": "true" } ] }, { "default_value": "", "editable": false, "label": "Default Moab Template", "variable_name": "MOABTEMPLATE", "visible": false, "properties": [ { "name": "id", "value": "moabtemplates" }, { "name": "enable", "value": "false" } ] }, { "default_value": "SHARED", "editable": false, "label": "Node Access Policy", "variable_name": "NODEACCESSPOLICY", "visible": false, "properties": [ { "name": "id", "value": "node-access-policy" }, { "name": "enable", "value": "false" } ] }, { "default_value": "FIRSTAVAILABLE", "editable": false, "label": "Node Allocation Policy", "variable_name": "NODEALLOCATIONPOLICY", "visible": false, "properties": [ { "name": "id", "value": "node-allocation-policy" }, { "name": "enable", "value": "false" } ] }, { "default_value": "EXACTSET", "editable": false, "label": "Node Requested Policy", "variable_name": "NODESREQUESTEDPOLICY", "visible": false, "properties": [ { "name": "id", "value": "nodes-requested-policy" }, { "name": "enable", "value": "false" } ] }, { "default_value": "", "editable": false, "label": "Operating System", "variable_name": "OPERATINGSYSTEM", "visible": false, "properties": [ { "name": "id", "value": "operatingSystem" }, { "name": "enable", "value": "false" } ] }, { "default_value": "", "editable": false, "label": "Requested Features", "variable_name": "FEATURESREQUESTED", "visible": false, "properties": [ { "name": "id", "value": "features-requested" }, { "name": "enable", "value": "false" } ] }, { "default_value": "", "editable": false, "label": "Excluded Features", "variable_name": "FEATURESEXCLUDED", "visible": false, "properties": [ { "name": "id", "value": "features-excluded" }, { "name": "enable", "value": "false" } ] }, { "default_value": "", "editable": false, "label": "Nodes Requested List", "variable_name": "NODESREQUESTED", "visible": false, "properties": [ { "name": "id", "value": "nodes-requested" }, { "name": "enable", "value": "false" } ] } ], "version_description": "Default Free Form Application Template", "version": 2 } ] }
Related Topics