Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14964

Add ability to call script from REST API

    Details

    • Similar Issues:

      Description

      It will be useful if we can execute saved scripts from REST API. Something like this: http://my-jenkins/scriptlet/ScriptName?param1=value1&param2=value2 with returning results in xml/json (any text form).

        Attachments

          Activity

          Hide
          agudian Andreas Gudian added a comment -

          I've created a Pull-Request at GitHub for this issue: https://github.com/jenkinsci/scriptler-plugin/pull/15

          It allows you to run a script using the URL /scriptler/run/<myScriptId>?param1=value1 (or the POST equivalent).
          The parameters {node, script (alternative script source), and contentType (for the response) are also available.

          Show
          agudian Andreas Gudian added a comment - I've created a Pull-Request at GitHub for this issue: https://github.com/jenkinsci/scriptler-plugin/pull/15 It allows you to run a script using the URL /scriptler/run/<myScriptId>?param1=value1 (or the POST equivalent). The parameters { node , script (alternative script source), and contentType (for the response) are also available.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Andreas Gudian
          Path:
          src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java
          src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagment/runscript.properties
          http://jenkins-ci.org/commit/scriptler-plugin/b0e9fbffcc80531272e9230cf695ef9e302776ad
          Log:
          JENKINS-14964 Allow running scripts using the REST API

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andreas Gudian Path: src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagment/runscript.properties http://jenkins-ci.org/commit/scriptler-plugin/b0e9fbffcc80531272e9230cf695ef9e302776ad Log: JENKINS-14964 Allow running scripts using the REST API
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Andreas Gudian
          Path:
          src/test/java/org/jenkinsci/plugins/scriptler/restapi/ScriptlerRestApiTest.java
          http://jenkins-ci.org/commit/scriptler-plugin/cb565fb2500acda536fecc0dc7ce6ee2a96417bc
          Log:
          JENKINS-14964 add test for REST API

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andreas Gudian Path: src/test/java/org/jenkinsci/plugins/scriptler/restapi/ScriptlerRestApiTest.java http://jenkins-ci.org/commit/scriptler-plugin/cb565fb2500acda536fecc0dc7ce6ee2a96417bc Log: JENKINS-14964 add test for REST API
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Andreas Gudian
          Path:
          src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java
          http://jenkins-ci.org/commit/scriptler-plugin/c6e37122cedcd83b37dd915f3f51e1a33847ea30
          Log:
          JENKINS-14964 fix error text to suggest the correct URL

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andreas Gudian Path: src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java http://jenkins-ci.org/commit/scriptler-plugin/c6e37122cedcd83b37dd915f3f51e1a33847ea30 Log: JENKINS-14964 fix error text to suggest the correct URL
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java
          src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagment/runscript.properties
          src/test/java/org/jenkinsci/plugins/scriptler/restapi/ScriptlerRestApiTest.java
          http://jenkins-ci.org/commit/scriptler-plugin/dbb18c412fcf888eb683e68877e879ad91fa4bdf
          Log:
          Merge branch 'JENKINS-14964' of https://github.com/agudian/scriptler-plugin into agudian-JENKINS-14964

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerManagment.java src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagment/runscript.properties src/test/java/org/jenkinsci/plugins/scriptler/restapi/ScriptlerRestApiTest.java http://jenkins-ci.org/commit/scriptler-plugin/dbb18c412fcf888eb683e68877e879ad91fa4bdf Log: Merge branch ' JENKINS-14964 ' of https://github.com/agudian/scriptler-plugin into agudian- JENKINS-14964
          Hide
          domi Dominik Bartholdi added a comment -

          integrated into 1.7

          Show
          domi Dominik Bartholdi added a comment - integrated into 1.7

            People

            • Assignee:
              domi Dominik Bartholdi
              Reporter:
              nirro Stanislav Tyurikov
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: