Script Management API

/api/space/script-management/scripts/exec-deploy (v1)

The following operations are supported on this resource:

POST /api/space/script-management/scripts/exec-deploy (v1)


This API deploys scripts on devices.

Access Control

The following capabilities are required to access this API:
"DeployScriptCap"


Example Usage

Since this API makes an asynchronous method call, the user must specify a queue parameter with this API.

POST /api/space/script-management/scripts/exec-deploy?queue-url=<queue-url>&schedule-time=<schedule-time>

Note: It is assumed that the queue denoted by <queue-url> has, already, been created.



Parameters

NameTypeURI TypeDescriptionRequired
queue-urlURLQueryA fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage)Y
schedule-timecron-like-expressionQuerySchedule this API in the future, by specifying a cron-like-expression (See Job Scheduling)N

Content Types

  • Consumes content types:
    application/vnd.net.juniper.space.script-management.exec-deploy+xml;version=1;charset=UTF-8
    application/vnd.net.juniper.space.script-management.exec-deploy+json;version=1;charset=UTF-8


  • Produces content types:
    application/vnd.net.juniper.space.script-management.exec-deploy+xml;version=1
    application/vnd.net.juniper.space.script-management.exec-deploy+json;version=1


  • Sample Input XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <scriptMgmts>
       <scriptMgmt>
          <deviceId>4117</deviceId>
          <scriptId>1114117</scriptId>
          <scriptVersionSelected>1.1</scriptVersionSelected>
          <scriptParams>
              <scriptParam>
                  <paramName>paramName</paramName>
                  <paramValue>paramValue</paramValue>
              </scriptParam>
          </scriptParams>
       </scriptMgmt>
       <scriptMgmt>
          <deviceId>4118</deviceId>
          <scriptId>1114119</scriptId>
          <scriptVersionSelected>1.1</scriptVersionSelected>
          <scriptParams>
              <scriptParam>
                  <paramName>paramName</paramName>
                  <paramValue>paramValue</paramValue>
              </scriptParam>
          </scriptParams>
       </scriptMgmt>
    </scriptMgmts>


  • Sample Output XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
      <id>786496</id>
    </task>


  • Sample Input JSON:
    {"scriptMgmts":
      [{"scriptMgmt":
      {"scriptId":"786432",
         "scriptVersionSelected":"1.1",
         "deviceId":"983043",
         "scriptParams":
         [{"scriptParam":
           {"paramName":"test",
           "paramValue":"test"}
      }]
      }
    }]
    }


  • Sample Output JSON:
    task:
    {
          id: 786496
    } l



    For the current version of this API, refer to :
  • version 2