Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Create a Device Group

 

The create Device Group operation creates a device group in Service Now.

URI

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

URI Parameters

None

Consumes

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

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

Request Elements

Element

Type

Description

deviceGroupName

String

Name of the device group

This is a mandatory element.

defaultDeviceGroup

String

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

organization

String

Organization to which the device group is to be assigned

href

String

Link to the organization

devices

device

Collection of devices to be assigned to the device group

device

String

Link to a device to be included in the device group

policies

policy

Collection of auto submit policies associated with the device group

policy

String

Link to the auto submit policy associated with the device group

domainId

Integer

ID of the domain in which the device group should be created.

This is an optional element. If no domain ID is provided, the device group is created in the Global domain.

Note: The create request fails if a user does not have access to the Global domain and if no domain ID is provided with the create request.

Produces

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

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

Response Elements

Element

Type

Description

msg

String

Status message of the create device group job

Sample Input

Sample XML Input

Sample JSON Input

Sample Output

Sample XML Output

Sample JSON Output

Response Status Code

Message

Description

SN-1000

Invalid device ID, device not found

404 Not Found

Invalid organization ID, organization not found

400 Bad Request

One of the following:

  • Invalid device group name is specified, device group name cannot be null or empty.

  • Invalid organization name, organization name cannot be null or empty.