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
e1651377-b920-3831-9722-2aeff6dc52cd
showLineNumberstrue
titleupdateCustomField.sil
urlhttps://bitbucket.cprime.io/projects/CAP/repos/sil-script-librarybranchIdrefs/heads/master
projectKeyCAP
filepathraw/API/updateCustomField.sil?at=refs%2Fheads%2Fmaster
showLineNumberstrue
progLangjava
applicationLinksyntaxHighlightingJavaScript

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
filepathraw/API/updateCustomField_curl.txt?at=refs%2Fheads%2Fmaster
showLineNumberstrue
progLangplain
applicationLinksyntaxHighlightingJavaScript

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

...