...
Schedules a run script task to be run asynchronously for the given script and returns a ScriptScheduledResponse. To run in the context of an issue, pass a property with the key "sil.issue.key" and value with the issue key.
Parameter | Type | Required | Description |
---|
source | ScriptSource
| yes | The script to run |
properties | array of objects containing "key" and "value" | no | Code Block |
---|
| "properties": [
{
"key": "sil.issue.key",
"value": "TEST-1"
}
] |
|
args | array of strings | no | will be passed into the script as the "argv" variable |
Code Block |
---|
title | Example Request using AJS |
---|
| AJS.$.ajax({
type: 'POST',
contentType: "application/json",
url : "http://localhost:7210/rest/keplerrominfo/refapp/latest/async-script/runScript",
data : JSON.stringify({
source: {
type: "FILE",
code: "example.sil"
}
}),
success : function(data) {
console.log(data);
},
beforeSend: function (xhr){
xhr.setRequestHeader('Authorization', "Basic " + btoa(username + ":" + password));
}
}); |
|
Code Block |
---|
title | Example JSON Response |
---|
| {
"key" : 4
} |
|
---|
...
Parameter | Type | Required | Description |
---|
source | ScriptSource
| yes | The script to run |
properties | array of objects containing "key" and "value" | no | Code Block |
---|
| "properties": [
{
"key": "sil.issue.key",
"value": "TEST-1"
}
] |
|
args | array of strings | no | will be passed into the script as the "argv" variable |
Code Block |
---|
title | Example Request using AJS |
---|
| AJS.$.ajax({
type: 'POST',
contentType: "application/json",
url : "http://localhost:7210/rest/keplerrominfo/refapp/latest/async-script/runDetachedScript",
data : JSON.stringify({
source: {
type: "INLINE",
code: "return 1;"
}
}),
success : function(data) {
console.log(data);
},
beforeSend: function (xhr){
xhr.setRequestHeader('Authorization', "Basic " + btoa(username + ":" + password));
}
}); |
|
Code Block |
---|
title | Example JSON Response |
---|
| HTTP 204 No content |
|
---|
...