/api/space/device-management/devices/{id}

The following operations are supported on this resource:

  • GET - Get device information by ID
  • DELETE - Remove Device by providing ID
GET /devices/{id}Version 1

This API is used to retrieve information for a specified device. It retrieves the name, ID, and other important device attributes.

Sample Usage

GET /devices/{id}


  • Parameters:
    NameTypeURI TypeDescriptionRequired
    device-idIntegerPathThe ID of the device for which information will be retrieved. Y
  • Sample Output XML:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <device uri="/api/space/device-management/devices/229377">
       <deviceFamily>junos-es</deviceFamily>
       <OSVersion>10.0R2.10</OSVersion>
       <platform>SRX100-LM</platform>
       <serialNumber>AT5109AF0621</serialNumber>
       <name>hsc-srx_100_lehar</name>
       <hostName>hsc-srx_100_lehar</hostName>
       <id>229377</id>
       <ipAddr>192.168.21.9</ipAddr>
       <change-requests uri="/api/space/device-management/devices/229377/change-requests">
       <change-request key="262186" href="/api/space/configuration-management/change-requests/262186">
          <deviceId>229377</deviceId>
          <name>TEST_NAME</name>
       </change-request>
       </change-requests>
       <managed-elements uri="/api/space/device-management/devices/229377/managed-elements">
          <managed-element key="262148" href="/api/space/managed-domain/managed-elements/262148">
             <ipAddr>192.168.21.9< /ipAddr>
             <deviceId>229377</ deviceId>
          </managed-element>
       </managed-elements>
       <managed-status uri="/api/space/device-management/devices/229377/managed-status">
           <status>In Sync</status>
       </managed-status>
       <connection-status uri="/api/space/device-management/devices/229377/connection-status">
           <status>up</status>
       </connection-status>
       <collection href="/api/space/device-management/devices/229377/configurations" rel="device configurations"/>
       <method href="/api/space/device-management/devices/229377/exec-rpc" rel="rpc"/>
       <method href="/api/space/device-management/devices/229377/synch-config"rel="synch device configuration"/>
       <associated-scripts href="/api/space/device-management/devices/229377/associated-scripts " rel="associated scripts"/>
       <associated-softwares href="/api/space/device-management/devices/229377/associated-softwares" rel="associated softwares"/>
    </device>

  • Sample Output JSON:

    {
      "device": {
          "@uri": "/api/space/device-management/devices/229377",
          "deviceFamily":"junos-es",
          "OSVersion":"10.0R2.10",
          "platform":"SRX100-LM",
          "serialNumber":"AT5109AF0621",
          "name":"hsc-srx_100_lehar",
          "hostName":"hsc-srx_100_lehar",
          "id":229377,"ipAddr":"192.168.21.9",
          "change-requests": {
              "@uri": "/api/space/device-management/devices/229377/change-requests",
                "change-request":{
                    "@key":"262186",
                    "@href":"/api/space/configuration-management/change-requests/262186",
                    "deviceId":229377,
                    "name":"TEST_NAME"
                }
          },
          "managed-elements":{
              "@uri": "/api/space/device-management/devices/229377/managed-elements",
              "managed-element":{
                  "@key":"262148",
                  "@href":"/api/space/managed-domain/managed-elements/262148",
                  "ipAddr":"192.168.21.9",
                  "deviceId":229377
              }
          },
          "managed-status":{
                "@uri":"/api/space/device-management/devices/229377/managed-status",
                "status":"In Sync"
          }
      },
      "connection-status":{
            "@uri": "/api/space/device-management/devices/229377/connection-status",
            "status":"up"
      },
      "collection":{
            "@href": "/api/space/device-management/devices/229377/configurations",
            "@rel":"device configurations"
      },
      "method": [
          {
              "@href": "/api/space/device-management/devices/229377/exec-rpc",
              "@rel":"rpc"
          },
          {
              "@href": "/api/space/device-management/devices/229377/synch-config",
              "@rel": "synch device configuration"
          },
          {
              "@href":"/api/space/device-management/devices/229377/associated-scripts",
              "@rel": "associated scripts"
          },
          {
              "@href": "/api/space/device-management/devices/229377/associated-softwares",
              "@rel":"associated softwares"
          }   ]

  • Access Control

    The following capabilities are required to access this API: ReadDevices

    DELETE /devices/{id}Version 1

    This API is used to delete a device from the database.

    Sample Usage

    This API makes an asynchronous method call, so you can, optionally, specify queue and schedule parameters:

    DELETE /devices/{id}?queue=<queue>&schedule=<schedule>


    Note: The queue URL denoted by <queue> must have been created already.


    • Parameters:
      NameTypeURI TypeDescriptionRequired
      device-idIntegerPathThe ID of the device to be removed from the database. Y
      queueQueue URLQueryA fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage)N
      schedulecron-like-expressionQuerySchedule this API in the future, by specifying a cron-like-expression (See Job Scheduling)N
  • Sample Output XML:

    <task href="/api/space/job-management/jobs/98365">
       <id>884737</id>
    </task>

  • Sample Output JSON:

    {"task":
        {
        "@href":"/api/space/job-management/jobs/3997704",
        "id":3997704
        }

  • Access Control

    The following capabilities are required to access this API: DeleteDevice