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

The following operation is supported on this resource:

  • GET - Get Script details and basic data by ID
GET /scripts/{script-id}/contentsVersion 1

This API finds and returns script details along with basic script data available on Junos Space.

Sample Usage

GET /scripts/{script-id}/contents


  • Parameters:
    NameTypeURI TypeDescriptionRequired
    script-idIntegerPathThe ID of the script to get from Junos Space Y
  • Sample Output XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <script>
          <id>1114117</id>
          <scriptName>cpu-usage-60.slax</ scriptName>
          <type>TYPE_EVENT</type>
          <category>sample</category>
          <format>FORMAT_SLAX</format>
          <lastestRevision>1.1</lastestRevision>
          <comments>Script is imported for the first time</comments>
          <scriptSize>7520</scriptSize>
          <scriptContents>ns junos .....</scriptContents>
          <collection href="/api/space/script-management/scripts/1114117/results" rel="script verification results"/>
    </script>

  • Sample Output JSON:
    script:
    {
          id: 1114117
          scriptName: cpu-usage-60.slax
          type: TYPE_EVENT
          category: sample
          format: FORMAT_SLAX
          lastestRevision: 1.1
          comments: Script is imported for the first time
          scriptSize: 7520
          scriptContents: ns junos .....
          collection:
          {
          @href:/api/space/script-management/scripts/ 1114117/results
          @rel:script verification results
          }
    }

  • Access Control

    The following capabilities are required to access this API: ExportScriptsCap