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 All Device Groups

    Use this API to retrieve information, such as name and organization, of all device groups present in Junos Space Service Now. This operation does not display devices within the device group.

    URI

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

    Consumes

    None

    Produces

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

    Response

    Element

    Type

    Description

    uri

    String

    URI of the collection of device groups in Service Now

    size

    Integer

    Number of device groups found.

    deviceGroup

    deviceGroup

    A device group

    key

    Integer

    Unique key to identify this device group.

    uri

    String

    Device group resource identifier.

    deviceGroupName

    String

    Device group name.

    isDefault

    Boolean

    Flag to specify if the device group is the default device group

    Possible values:

    • true—The device group is the default device group
    • false—The device group is not the default device group

    This element is valid only if Service Now is operating in Partner Proxy mode. You cannot delete a default device group until another device group is set as the default.

    organizationName

    String

    Organization to which this device group is assigned

    domainId

    Integer

    ID of the domain to which a device group belongs

    Sample Output

    Sample XML Output

    <devicegroups size="1" uri="/api/juniper/servicenow/device-group-management/deviceGroup">
            <devicegroup key="327680"  uri="/api/juniper/servicenow/device-group-management/deviceGroup/327680"  href="/api/juniper/servicenow/device-group-management/deviceGroup/327680">
                    <deviceGroupName>test</deviceGroupName>
                    <isDefault>true</isDefault>
                    <organizationName>testdg</organizationName>
            </devicegroup>
    	  <domainId>10</domainId>
    </devicegroups>
    

    Sample JSON Output

    devicegroups:{
            size:1,
            uri:'/api/juniper/servicenow/device-group-management/deviceGroup',
            devicegroup:{
                key:327680,
                uri:'/api/juniper/servicenow/device-group-management/deviceGroup/327680',
                href:'/api/juniper/servicenow/device-group-management/deviceGroup/327680',
                devicegroupname:'test',
    		 isDefault:’true’
                organizationname:'testdg',
    		  domainId:’10’        
    		}
        }
    

    Response Status Code

    Message

    Description

    204 No Content

    No device groups found.

    Modified: 2016-08-11