/api/space/script-management/scripts/exec-deploy

The following operations are supported on this resource:

  • POST - Deploy scripts on device
  • POST - Run Deploy Scripts On Devices_v3 - Deploy scripts on device
POST /scripts/exec-deployVersion 2

This API deploys scripts on devices. Here a script and a device are passed as reference URLs (href).

Sample Usage

This API makes an asynchronous method call; so, you can optionally specify queue and schedule parameters:

POST /scripts/exec-deploy?queue=<queue>&schedule=<schedule>


Note: The queue URL denoted by <queue> must have been created already.


  • Parameters:
    NameTypeURI TypeDescriptionRequired
    queueQueue URLQueryA fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage)N
    schedulecron-like-expressionQuerySchedule this API in the future, by specifying a cron-like-expression (See Job Scheduling)N
  • Sample Input XML:
    <exec-deploy>
       <scriptMgmt>
         <script href="/api/space/script-management/scripts/294912" />
         <device href="/api/space/device-management/devices/458753" />
         <scriptVersionSelected>1.1</scriptVersionSelected>
         <scriptParams>
           <scriptParam>
             <paramName>paramName1</paramName>
             <paramValue>paramValue1</paramValue>
           </scriptParam>
           <scriptParam>
             <paramName>paramName2</paramName>
             <paramValue>paramValue2</paramValue>
           </scriptParam>
         </scriptParams>
       </scriptMgmt>
    </exec-deploy>

  • Sample Output XML:
    <task href="/api/space/job-management/jobs/688128">
      <id>688128</id>
    </task>

  • Sample Input JSON:
    {
      "exec-deploy": {
        "scriptMgmt": {
          "script":{
            "@href":"/api/space/script-management/scripts/294912"
          },
          "scriptVersionSelected":"1.1",
          "device":{
            "@href":"/api/space/device-management/devices/458753"
          },
          "scriptParams": {
            "scriptParam": [
              {
                "paramName":"test1",
                "paramValue":"test1"
              },
              {
                "paramName":"test2",
                "paramValue":"test2"
              }
            ]
          }
        }
      }
    }

  • Sample Output JSON:
    {
      "task":{
        "@href":"/api/space/job-management/jobs/688132",
        "id":688132
      }
    }

  • Access Control

    The following capabilities are required to access this API: DeployScriptCap

      For the deprecated versions of this API, refer to :
    • version 1

    POST /scripts/exec-deployVersion 2

    Run Deploy Scripts On Devices_v3.

    Sample Usage

    This API makes an asynchronous method call; so, you can optionally specify queue and schedule parameters:

    POST /scripts/exec-deploy?queue=<queue>&schedule=<schedule>


    Note: The queue URL denoted by <queue> must have been created already.


    • Parameters:
      NameTypeURI TypeDescriptionRequired
      queueQueue URLQueryA fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage)N
      schedulecron-like-expressionQuerySchedule this API in the future, by specifying a cron-like-expression (See Job Scheduling)N
  • Sample Input XML:
    <exec-deploy-request>
         <script-deploy-profiles>
               <script-deploy-profile>
                   <script-details total="Integer">
                         <script-detail>
                             <script href="/api/space/script-management/scripts/{id}"/>
                             <script-enable>Boolean</script-enable>
                             <script-version-selected>String</script-version-selected>
                             <script-params total="Integer">
                                   <script-params-gui>
                                       <param-value>String</param-value>
                                       <param-name>String</param-name>
                                   </script-params-gui>
                             </script-params>
                         </script-detail>
                   </script-details>
                   <devices total="Integer">
                         <device href="/api/space/device-management/devices/{id}"/>
                   </devices>
               </script-deploy-profile>
         </script-deploy-profiles>
    </exec-deploy-request>

  • Sample Output XML:
    <task href="/api/space/job-management/jobs/688128">
      <id>688128</id>
    </task>

  • Sample Input JSON:
    {
       "exec-deploy-request" : {
         "script-deploy-profiles" : {
           "script-deploy-profile" : [
             {
               "script-details" : {
                 "@total" : "Integer" ,
                 "script-detail" : [
                   {
                     "script" : {
                       "@href" : "/api/space/script-management/scripts/{id}"
                     } ,
                     "script-enable" : "Boolean" ,
                     "script-version-selected" : "String" ,
                     "script-params" : {
                       "@total" : "Integer" ,
                       "script-params-gui" : [
                         {
                           "param-value" : "String" ,
                           "param-name" : "String"
                         }
                       ]
                     }
                   }
                 ]
               } ,
               "devices" : {
                 "@total" : "Integer" ,
                 "device" : [
                   {
                     "@href" : "/api/space/device-management/devices/{id}"
                   }
                 ]
               }
             }
           ]
         }
       }
    }

  • Sample Output JSON:
    {
      "task":{
        "@href":"/api/space/job-management/jobs/688132",
        "id":688132
      }
    }

  • Access Control

    The following capabilities are required to access this API: DeployScriptCap