Script Management API

/api/space/script-management/scripts/{script-id}/results

The following operations are supported on this resource:

GET /api/space/script-management/scripts/{script-id}/results (v1)


This API finds all available script verification results and returns a list of them. The API supports the paging, filtering, and sorting of data.

Filtering and Sorting is supported on the scriptMgmtJobStatus and jobRemarks columns

.

Note: Filtering on the 'scriptMgmtJobStatus' field does not support the 'contains' and 'starts-with' operators..

Access Control

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


Example Usage

GET /api/space/script-management/scripts/{script-id}/results


Parameters

NameTypeURI TypeDescriptionRequired
script-idintPathThe ID of the script to get from Junos Space Y

Content Types

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


  • Sample Output XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <scriptResults size="2" uri="/api/space/script-management/scripts/1114117">
       <scriptResult>
          <scriptName>cpu-usage-60.slax</scriptName>
          <deviceId>224334</deviceId>
          <actionType>Verify_Script</actionType>
          <scriptMgmtJobStatus>FAILED</scriptMgmtJobStatus>
          <jobRemarks>Verify script Failed. Reason: 224334 is no more available in JUNOS Space</jobRemarks>
       </scriptResult>
       <scriptResult>
          <scriptName>show-interfaces.slax</scriptName>
          <deviceId>224335</deviceId>
          <actionType>Verify_Script</actionType>
          <scriptMgmtJobStatus>SUCCESS</scriptMgmtJobStatus>
          <jobRemarks>Script Verified Successfully</jobRemarks>
       </scriptResult>
    </scriptResults>


  • Sample Output JSON:
    scriptResults:
    {
    @size: 2
    @uri: /api/space/script-management/scripts/1114117
    scriptResult:
    [
       scriptName:cpu-usage-60.slax
       deviceId:224334
       actionType:Verify_Script
       scriptMgmtJobStatus:FAILED
       jobRemarks:Verify script Failed. Reason: 224334 is no more available in JUNOS Space
       scriptName:show-interfaces.slax
       deviceId:224335
       actionType:Verify_Script
       scriptMgmtJobStatus:SUCCESS
       jobRemarks:Script Verified Successfully
    ]
    }