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

    Get Information About a Device Group

    Use this API to retrieve information about a device group, including devices that are a part of the device group.

    URI

    https://[host]/api/juniper/servicenow/device-group-management/deviceGroup/{id} (HTTP method = GET)

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    Integer

    Yes

    ID of the device group for which information is to be retrieved

    Consumes

    None

    Produces

    • application/vnd.juniper.servicenow.device-group-management.devicegroup+xml;version=2
    • application/vnd.juniper.servicenow.device-group-management.devicegroup+json;version=2

    Response

    Element

    Type

    Description

    uri

    String

    URI of the device group

    deviceGroupName

    String

    Device group name

    organization

    organization

    Organziation to which the device group is assigned

    href

    String

    Link to the organization

    id

    Integer

    ID of the organization

    deviceGroupId

    Integer

    ID of the device group

    name

    String

    Organization name

    devices

    device

    Devices assigned to the device group

    size

    Integer

    Number of devices in the device group

    key

    Integer

    ID of the device

    hostName

    String

    Device DNS hostname.

    rel

    String

    Description of an operation that can be performed on this resource.

    domainId

    Integer

    ID of the domain in which the device group is created

    Sample Output

    Sample XML Output

    <deviceGroup uri="/api/juniper/servicenow/device-group-management/deviceGroup/327680">
           <deviceGroupName>test</deviceGroupName>
                   <organization href="/api/juniper/servicenow/organization-management/organization/229377">
                          <id>229377</id>
                          <deviceGroupId>327680</deviceGroupId>
                         <name>testdg</name>
                  </organization>
                  <devices size="2" href="/api/juniper/servicenow/device-management/devices">
                         <device key="99503" href="/api/juniper/servicenow/device-management/devices/99503">
                         <hostName>SRX1400-b</hostName>
                  </device>
                  <device key="99504" href="/api/juniper/servicenow/device-management/devices/99504">
                         <hostName>SRX1400-a</hostName>
                  </device>
    	  <domainId>10</domainId>
           </devices>
           <id>327680</id>
           <method href="/api/juniper/servicenow/device-group-management/deviceGroup /327680/associateDevices" rel="Associate devices to device group"/>
    </deviceGroup>
    

    Sample JSON Output

    devicegroup:{
            uri:'/api/juniper/servicenow/device-group- management/deviceGroup/327680',
            devicegroupname:'test',
            organization:{
                href:'/api/juniper/servicenow/organization-management/organization/229377',
                id:229377,
                devicegroupid:327680,
                name:'testdg'
            },
            devices:{
                size:2,
                href:'/api/juniper/servicenow/device-management/devices',
                device:[
                    {
                        key:99503,
                        href:'/api/juniper/servicenow/device-management/devices/99503',
                        hostname:'SRX1400-b'
                    },
                    {
                        key:99504,
                        href:'/api/juniper/servicenow/device-management/devices/99504',
                        hostname:'SRX1400-a'
                    }
                ]
            },
            id:327680,
            method:{
                href:'/api/juniper/servicenow/device-group-management/deviceGroup/ 327680/associateDevices',
                rel:'Associate devices to device group'
            }
    	domainId:’10’
        }
    

    Response Status Code

    Message

    Description

    404 Not Found

    Invalid device group identifier specified. No device group found.

    Modified: 2016-08-10