RunScript
Run a service script.
Service | Operation |
---|---|
script | RUN |
Method Parameters
Parameter | Description |
---|---|
scriptName | The name of the script with its path to be run |
scriptData | Data to be sent to the script in JSON format |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var scriptName = "path/to/script1";
var scriptData = {
"arg1": 42,
"arg2": true,
"arg3": "example"
};
var scriptProxy = bridge.getScriptServiceProxy();
var postResult = scriptProxy.runScript(scriptName, scriptData);
if (postResult.status == 200) {
// Success!
}
{
"service": "script",
"operation": "RUN",
"data": {
"scriptName": "path/to/script1",
"scriptData": {
"parm": "value"
}
}
}
JSON Response
{
"status": 200,
"data": {
"success": true
}
}