Service Help – Process
The Sharperlight service offers a wide variety of presentation methods, each with its own set of parameters.
In this post, we will introduce the following method from among the various presentation methods available.
http://abcd.com/mdService1Rest/Process/…
{sharperlight service url}/Help#Process
|
Execute a DataModel Server side process with the specified parameters and process the return status if any. If Windows Authenication is turned on in the Service then usid is optional but the POST will work quicker if you have an usid. To discover the Process module and code you will need to open the Datamodel in Studio or have access to the Datamodel documentation files. DEFAULT Status
http://sharperlight-my/mdService1Rest/Process/?productcode=ADVW&modulecode=WriteBack&processcode=ExecuteSQL&p1=xxxx&p2=zzzz&usid=feb73c8c0e9c41989da001ea86c15e5aZ
{ “errorMessage”:”Invalid Process Code ExecuteSQL” }
SUCCESS STATUS with Parameters
{ “statusCount”:2 ,”results”: [“AAAA”,”BBBB”] }
SUCCESS STATUS without Parameters
{ “statusCount”:0 }
JSON Callback Status
http://sharperlight-my/mdService1Rest/Process/?productcode=ADVW&modulecode=WriteBack&processcode=ExecuteSQL&response=json&callback=MyFunc&p1=xxxx&p2=zzzz&usid=feb73c8c0e9c41989da001ea86c15e5aZ
ERROR STATUS
MyFunc( { “errorMessage”:”Invalid Process Code ExecuteSQL” } );
SUCCESS STATUS with Parameters
MyFunc( { “statusCount”:2,”results”: [“AAAA”,”BBBB”] } );
SUCCESS STATUS without Parameters
MyFunc( { “statusCount”:0 } );
|
|
| productcode=[product] | DataModel Product Code e.g. &productcode=ADVW |
| modulecode=[code] | DataModel Server side Process Module code e.g. &module=WriteBack |
| processcode=[code] | DataModel Server side Process code under the specified Module e.g. &process=ExecuteSQL |
| p1=[value] | Parameter 1 value e.g. &p1=ABC |
| p(n)=[value] | Parameter (n)th value e.g. &p1=ABC&p2=123&p3=ZZZZZ |
| usid=[sessionid] | User Session ID |
| response=[default|json] | The format of the response e.g. &response=json |
| callback=[funcName] | The Javascript JSONP callback function name (optional) e.g. &callback=ProcessDone |
| messageOK=[value] | Override the Message format so that your own text is displayed e.g. &messageOK=Done |
| messageError=[value] | Override the error Message format so that your own text is displayed if an error occurs e.g. &messageError=Failed |
| messageTitle=[value] | Override the Message format so that your own text is displayed (Title above message) e.g. &messageTitle=Status |
