Versions Compared

Key

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

...

To start, we need to the script that will run when called by the REST Service. This script is actually very generic, any custom field can be set using a simple script like this:

sil
Stashincludebyfilepath
repoSlug
Bitbucket file macro
showLineNumberstrue
titleupdateCustomField.sil
urlhttps://bitbucket.cprime.io/projects/CAP/repos/sil-script-librarybranchIdrefs/heads/master
projectKeyCAP
filepathbrowse/API/updateCustomField.sil
showLineNumberssyntaxHighlightingtrue
progLangjava
applicationLinke1651377-b920-3831-9722-2aeff6dc52cd
JavaScript

This is an example Curl script that calls the Power Scripts REST Service to run the script. StashincludebyfilepathrepoSlug

Bitbucket file macro
e1651377-b920-3831-9722-2aeff6dc52cd
showLineNumberstrue
titleupdateCustomField_curl.txt
urlhttps://bitbucket.cprime.io/projects/CAP/repos/sil-script-librarybranchIdrefs/heads/master
projectKeyCAP
filepathbrowse/API/updateCustomField_curl.txt
showLineNumberstrue
progLangplain
applicationLinksyntaxHighlightingJavaScript

To customize this curl script you need to do the following:

...