Saves a script to the database.

 

Request

Method

URL

POST

/smserver-default/sms.SaveScript

RAW

POST /smserver-default/sms.SaveScript HTTP/1.1

Cache-Control: no-cache

Connection: Keep-Alive

Pragma: no-cache

Content-Type: application/json; charset=UTF-8

Accept: */*

Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

 

[

  {

       "_id" : "4K4EMVZF2Q6U5GRPQIWCDFS5FA",

       "ScriptName" : "Pippo",

       "ScriptSource" : "begin\nend.",

       "ScriptLanguage" : "Pascal"

   }

]

Explained

Saves a script object to the database.

 

Payload:

A one-element JSON array containing a single object which properties are as follows.

 

_id: unique ID of the script

ScriptName: A friendly short name

ScriptSource: Actual source code of the script

ScriptLanguage: Languiage ("Pascal", "CPP", "JavaScript", or "Basic")

 

Response

Method

URL

RAW

Accept-Encoding: synlz,gzip

Content-Type: application/json; charset=UTF-8

 

 

[

  {

       "_id" : "4K4EMVZF2Q6U5GRPQIWCDFS5FA",

       "ScriptName" : "Pippo",

       "ScriptSource" : "begin\nend.",

       "ScriptLanguage" : "Pascal"

   }

}

Explained

If successful, this function returns the exact same payload that was send in the request.