A root user can reconnect to any running script. A user is only allowed to reconnect to a running script they own.
For more information on scripting, see Working with CLI Scripting in Oracle ZFS Storage Appliance Administration Guide, Release OS8.7.0
Example Request:
$ curl -k -H "Accept: text/plain" --user root:l1a https://aus7110-030:215/api/workflow/v1/scripts/1
POST /api/workflow/v1/workflows HTTP/1.1
Authorization: Basic abcefgMWE=
Host: zfssa.example.com:215
Accept: application/json
Content-Type: application/javascript
Content-Length: 290
var workflow = {
name: 'Echo',
description: 'Echo bird repeats a song.',
parameters: {
song: {
label: 'Words of a song to sing',
type: 'String',
}
},
execute: function (params) { return (params.song) }
};
Example Result:
{
"test2": {,
"str": "this is a string",
"bool": "True",
"posint": 994,
"int": 1123,
"address": "",
"host": "192.168.1.110",
"hostname": "opensolaris.org",
"color": "red",
"languages": "latin",
"size": "red",
"onoff": "off",
"number": 0,
"stringlist": "this is another string",
"emptystringlist": "this is another string",
"yetanotherstr": "You can't change me",
"emptystr": "Any string",
"password": "topsecret",
"longpassword": "doubletopsecret",
"permissions": "022",
"nonnegativeint": 42,
"port": 21,
"time": "Thu Jan 01 1970 15:22:30 GMT+0000 (UTC)",
"date": "Sun Jun 17 2007 00:00:00 GMT+0000 (UTC)",
"datetime": "Sun Jun 17 2007 15:22:00 GMT+0000 (UTC)",
"hostport": "10.5.22.178:697",
"dn": "uid=root,ou=people,dc=fishpong,dc=com",
"commalist": "foo,bar"
}
},
"utask": []
}
HTTP/1.1 201 Created
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 268
X-Zfssa-Version: jkremer/generic@2013.09.14,1-0
Location: /api/workflow/v1/workflows/f4fe892f-cf46-4d6a-9026-cd0c0cce9971
{
"workflow": {
"href": "/api/workflow/v1/workflows/f4fe892f-cf46-4d6a-9026-cd0c0cce9971",
"name": "Echo",
"description": "Echo bird repeats a song.",
"uuid": "f4fe892f-cf46-4d6a-9026-cd0c0cce9971",
"owner": "root",
"origin": "<local>",
"setid": false,
"alert": false,
"version": "",
"scheduled": false
}
}