Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to run SIL Scripts via REST, use the SIL Common REST Service.

Basic Steps

When creating scripts for use with REST, follow these steps:

  1. Create the script with hard-coded values and make sure it works the way you want it to.

  2. Replace the hard-coded values with variables that accept arguments (the argv variable) when run from an outside source.

  3. (optional) Test the script using the call() routine. This is an important step to test the script without the complications of a network.

  4. Make modifications to the example curl script to test running the script.

I will break down each step with an example script that uses the createIssue() routine.

Create a Script with Hard-Coded Values

...

In a separate script, run the script using the call() routine. Notice how the number of elements in the array matches the arguments used by argv in the above script. The arguments used should match all elements accessed in the script being called. 

...