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 |
isDefault | Boolean | Specifies if the device group is the default device group Possible values:
|
domainId | Integer | ID of the domain to which the device group is assigned |
organization | organization | Organization 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 | devices | Collection of devices assigned to the device group |
href | String | Link to the collection of devices assigned to the device group |
size | Integer | Number of devices in the device group |
device | device | Device assigned to the device group |
href | String | Link to the device |
key | Integer | ID of the device |
hostName | String | Device hostname |
policies | policies | Collection of auto submit policies assigned to the device group |
href | String | Link to the collection of auto submit policies assigned to the device group |
size | Integer | Number of auto submit policies in the device group |
policy | policy | Auto submit policy assigned to the device group |
href | String | Link to the auto submit policy |
key | Integer | ID of the auto submit policy |
policyName | String | Name of the auto submit policy |
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 |
method | method | Methods applicable to the device |
href | String | Link to the method applicable for the device group |
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> <policies href="/api/juniper/servicenow/autosubmit-policy-management/autosubmitpolicies" size="1"> <policy href="/api/juniper/servicenow/autosubmit-policy-management/autosubmitpolicies/1573152" key="1573152"> <policyName>p1</policyName> </policy> </policies> <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' } ] }, policies:{ size:1, href:'/api/juniper/servicenow/autosubmit-policy-management/autosubmitpolicies', policy:[ { key:1573152, href:'/api/juniper/servicenow/autosubmit-policy-management/autosubmitpolicies/1573152', policyName:'p1' }, ] }, 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. |