RockScript Documentation
Introduction Why and when How does it work Project status Getting started Command line interface Tutorial Language Script versioning License Roadmap Help Services HTTP service API Commands Deploy script Start script Queries Script execution Service SPI End function


Commands are RPC style operations that change the state of the RockScript server. Commands are invoked by a HTTP POST to http://localhost:3652/command with the command JSON as the body. We hope to add message based API later. Commands have a the following JSON serialization form (aka wrapper object):

{"commandName": { ...command data fields... }}

Example of a command request/response:

> POST http://localhost:3652/command
  Content-Type: application/json
  { "saveScript":
      "scriptName": "My first script",
      "scriptText": "var v = 42;"

< HTTP/1.1 200 OK
  Access-Control-Allow-Origin: *
  Content-Type: application/json
  { "id":"sv1",
    "name":"My first script",
    "text":"var v = 42;"