Related Documentation
Create an Address Group
Use this API to create an address group in Junos Space Service Now.
URI
https://[host]/api/juniper/servicenow/address-group-management/addressGroups/create (HTTP method = POST)
URI Parameters
None
Consumes
- application/vnd.juniper.servicenow.address-group-management.addressgroup+xml; version=1;charset=UTF-8
- application/vnd.juniper.servicenow.address-group-management.addressgroup+json; version=1;charset=UTF-8
Produces
- application/vnd.juniper.servicenow.address-group-management.addressgroup+xml ;version=1
- application/vnd.juniper.servicenow.address-group-management.addressgroup+json ;version=1
Response Elements
Element | Type | Description |
---|---|---|
name | String | Name of the location, such as the business name. This element is mandatory. |
address1 and address2 | String | Address, such as street number and street name, to be associated with the device. address 1 is required, where as address 2 is optional |
city, state and zipCode | String | City, State and Zip Code of the location. These elements are mandatory. |
contactName | String | Name of contact associated with this address group. |
contactPhone | String | Phone number of contact associated with this address group. |
createdBy | String | User creating this address group. |
creationTime | String | Date and time the address group was created. |
modificationTime | String | Date and time the address group was last modified. |
hostName | String | Hostname of the device associated with this address group. hostname is displayed only if Service Now can obtain the device information. |
serialNumber | String | Serial number of the device associated with this address group. serialnumber is displayed only if Service Now can obtain the device information. |
platform | String | Device platform associated with this address group. platform is displayed only if Service Now can obtain the device information. |
domainId | Integer | ID of the domain in which the address group is created |
Sample Input
Sample XML Input
<addressGroup> <name>Juniper Networks</name> <address1>Plot No. 66</address1> <address2>Bagmane Tech Park</address2> <city>Bangalore</city> <state>Karnataka</state> <country>India</country> <zipCode>566093</zipCode> <contactName>Jim</contactName> <contactPhone>9878906754</contactPhone> <alternativePhone>687677868</alternativePhone> <notes>This is juniper bangalore address</notes> <domainId>10</domainId> </addressGroup>
Sample JSON Input
{ "addressGroup": { "name": "Juniper Corp", "address1": " Plot No. 66", "address2": "Bagmane Tech Park", "city": "Bangalore", "state": "Bangalore", "country": "India", "zipCode": 560093 "domainId":"10" } }
Sample Output
Sample XML Output
<addressGroup uri="/api/juniper/servicenow/address-group-management/addressGroups/create"> <id>11501570</id> <name>Juniper Networks</name> <address1>Plot No. 66</address1> <address2>Bagmane Tech Park</address2> <city>Bangalore</city> <state>Karnataka</state> <country>India</country> <contactName>Jim</contactName> <contactPhone>9878906754</contactPhone> <alternativePhone>687677868</alternativePhone> <notes>This is juniper bangalore address</notes> <createdBy>super</createdBy> <creationTime>2012-08-26 04:00:21 IST</creationTime> <modifiedTime>2012-08-26 04:00:21 IST</modifiedTime> <zipCode>566093</zipCode> <domainId>10</domainId> <method href="/api/juniper/servicenow/address-group-management/addressGroups/ 11501570/modify" rel="Modify Address Group"/> <method href="/api/juniper/servicenow/address-group-management/addressGroups/ 11501570/associateDevices" rel="Associate Devices to Address Group"/> <method href="/api/juniper/servicenow/address-group-management/addressGroups/ 11501570/deassociateDevices" rel="Deassociate Devices from Address Group"/> </addressGroup>
Sample JSON Output
{ "addressGroup": { "@uri": "/api/juniper/servicenow/address-group-management/addressGroups/create", "id": 11501572, "name": "Juniper Corp", "address1": " Plot No. 66", "address2": "Bagmane Tech Park", "city": "Bangalore", "state": "Bangalore", "country": "India", "contactName": "Vijay", "contactPhone": "1223466", "alternativePhone": "7777", "notes": "Current location", "createdBy": "super", "creationTime": "2012-08-26 15:17:38 IST", "modifiedTime": "2012-08-26 15:17:38 IST", "zipCode": 560093, "domainId":"10" "method": [ { "@href": "/api/juniper/servicenow/address-group-management/addressGroups /11501572/modify", "@rel": "Modify Address Group" }, { "@href": "/api/juniper/servicenow/address-group-management/addressGroups /11501572/associateDevices", "@rel": "Associate Devices to Address Group" }, { "@href": "/api/juniper/servicenow/address-group-management/addressGroups /11501572/deassociateDevices", "@rel": "Deassociate Devices from Address Group" } ] } }
Response Status Code
Message | Description |
---|---|
400 Bad Request | Indicates one of the following:
|