Menu

ReadScript

Jim

Read a certain Script

Returns an existing Script in the domain of an owner identified by the apikey

Path: cs-ws/resources/admin/script Method: GET

Parameters

  • apikey
  • script_name
  • version

Errors:

  • 401 UNAUTHORIZED if key is invalid
  • 404 NOT FOUND if the script is not found

Example

GET http://localhost/cs-ws/resources/admin/script/?version=1&script_name=TestScript2&apikey=1234 HTTP/1.1

HTTP/1.1 200 OK
<script>
   <code>import com.m2mlabs.cs.manager.IScriptRunner;
import com.m2mlabs.cs.model.SensorData;
class Greeter implements IScriptRunner {public void run(String apikey, String deviceName, SensorData sensor) throws ScriptException {println (deviceName) ;}}</code>
   <name>TestScript2</name>
   <version>1</version>
</script>

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.