Device Image Management API

/api/space/software-management/packages

The following operations are supported on this resource:

GET /api/space/software-management/packages (v1)


This method retrieves all the software packages based on a passed URI context. It returns a DeviceImage transfer object. It also supports the filtering, paging, and sorting of returned data.

Access Control

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


Example Usage

GET /api/space/software-management/packages

Content Types

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


  • Sample Output XML:
    <packages uri="/api/space/software-management/packages" size="1">
      <package key="2130213" href="/api/space/software-management/packages/2130213"
      <uri="/api/space/software-management/packages/2130213">
        <fileName>junos-srxsme-10.2R2.11-domestic.tgz</fileName>
        <version>11.0R2.10</version>
        <platformType>EX3200</platformType>
      </package>
    </packages>


  • Sample Output JSON:
    {"packages":
      {"@uri":"/api/space/software-management/packages","@size":"1",
      "package":
        {"@key":"2130213",
        "@href":"/api/space/software-management/packages/2130213",
        "@uri":"/api/space/software-management/packages/2130213",
        "fileName":"junos-srxsme-10.2R2.11-domestic.tgz",
        "version":"11.0R2.10",
        "platformType":"EX3200"
        }
      }
    }



POST /api/space/software-management/packages (v1)


This API uploads a software package file to the Junos Space platform.

  • For sample code (multipart request), see:
    Sample Code
.

Access Control

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


Example Usage

POST /api/space/software-management/packages


Parameters

NameTypeURI TypeDescriptionRequired

Data Notification

This API supports data notification.

See the following links for information about enabling data notifications changes to be received for this service:

  • Data Notification Usage.


Content Types

  • Consumes content types:
    multipart/form-data


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


  • Sample Output XML:
    <package key="4030528">
      <fileName>junos-srxsme-10.2R2.11-domestic.tgz</fileName>
      <fileMD5>896ec81c9e24d638ae569f0a8bba0de7</fileMD5>
      <version>10.4R1.9</version>
      <size>43593469</size>
      <uploadStatus>UPLOAD_SUCCESS</uploadStatus>
      <allowDelete>true</allowDelete>
      <uploadTime>2011-04-04 09:28:20.32</uploadTime>
      <platformType>SRXSME</platformType>
    </package>


  • Sample Output JSON:
    {"package":
      {
      "@key":"4030528",
      "fileName":"junos-srxsme-10.2R2.11-domestic.tgz",
      "fileMD5":"896ec81c9e24d638ae569f0a8bba0de7",
      "version":"10.4R1.9",
      "size":43593469,
      "uploadStatus":"UPLOAD_SUCCESS",
      "allowDelete":true,
      "uploadTime":"2011-04-04 09:28:20.32",
      "platformType":"SRXSME"
      }
    }