/api/space/script-management/scripts/{script-id}/contents
The following operations are supported on this resource:
GET /api/space/script-management/scripts/{script-id}/contents (v1)
This API finds and returns script details along with basic script data available on Junos Space.
Access Control
The following capabilities are required to access this API:
"ExportScriptsCap"
Example Usage
GET /api/space/script-management/scripts/{script-id}/contentsParameters
Name | Type | URI Type | Description | Required |
script-id | Integer | Path | The ID of the script to get from Junos Space | Y |
Content Types
-
Produces content types:
application/vnd.net.juniper.space.script-management.script+xml;version=1
application/vnd.net.juniper.space.script-management.script+json;version=1 -
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>
<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
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
}
}