Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Associate a Device with a Device Group

    Use this API to associate a device with a device group.

    URI

    https://[host]/api/juniper/servicenow/device-management/devices/ {id}/associateDeviceGroup (HTTP method = POST)

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    Integer

    Yes

    ID of the device to be associated with the device group.

    Consumes

    • application/vnd.juniper.servicenow.device-management. associatedevicegroup+xml;version=1;charset=UTF-8
    • application/vnd.juniper.servicenow.device-management. associatedevicegroup+json;version=1;charset=UTF-8

    Request Elements

    Element

    Type

    Description

    devicegroup

    devicegroup

    Device group with which the device should be associated

    href

    String

    URI to the device group

    uri

    String

    URI to the device group

    Produces

    • application/vnd.juniper.servicenow.device-management.servicenowmsg+xml;version=1
    • application/vnd.juniper.servicenow.device-management.servicenowmsg+json;version=1

    Response Elements

    Element

    Type

    Description

    msg

    String

    Message indicating the result of the associate a device with a device group job

    Sample Input

    Sample XML Input

    <associatedevicegroup>
            <devicegroup href="/api/juniper/servicenow/device-group-management/deviceGroup/262194" uri="/api/juniper/servicenow/device-group-management/deviceGroup/262194" />
    </associatedevicegroup>
     

    Sample JSON Input

    {
       "associatedevicegroup": {
          "devicegroup": {
             "@href": "/api/juniper/servicenow/device-group-management/deviceGroup/262194",
             "@uri": "/api/juniper/servicenow/device-group-management/deviceGroup/262194"
          }
       }
    }
    
    

    Sample Output

    Sample XML Output

    <servicenowmsg>
    <msg>Device successfully associated with device group</msg>
    </servicenowmsg>
    

    Sample JSON Output

    {
       "servicenowmsg": {
          "msg": "Device successfully associated with device group"
       }
    }
     
    

    Modified: 2018-02-01