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

    Modify an Address Group

    Use this API to modify an address group in Junos Space Service Now.

    URI

    https://[host]/api/juniper/servicenow/address-group-management/addressGroups/{id}/modify (HTTP method = POST)

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    Integer

    Yes

    ID of the address group to be modified

    Consumes

    • application/vnd.juniper.servicenow.address-group-management.addressgroup+xml;version=1
    • application/vnd.juniper.servicenow.address-group-management.addressgroup+json;version=1

    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

    address1 and address2

    String

    Address, such as street number and street name, to be associated with the device

    These are mandatory fields.

    city, state and zipCode

    String

    City, State and Zip Code of the location

    These are mandatory fields.

    contactName

    String

    Name of contact associated with this address group

    contactPhone

    String

    Phone number of contact associated with this address group

    createdBy

    String

    Username of the person who created this address group

    creationTime

    String

    Date and time the address group was created

    modificationTime

    String

    Date and time the address group was last modified

    domainId

    Integer

    ID of the domain in which the address group is created

    This is an optional element. The value provided in this element is ignored if the value is invalid or a domainId other than the current domainId is provided.

    Sample Input

    Sample XML Input

    <addressGroup>
      <address1>Plot No. 66</address1>
      <address2>Bagmane Tech Park</address2>
      <city>Bangalore</city>
      <state>Karnataka</state>
      <country>India</country>
      <zipCode>566093</zipCode>
      <contactName>Jim Laker</contactName>
      <contactPhone>9878906754</contactPhone>
      <alternativePhone>687677868</alternativePhone>
      <notes>This is juniper bangalore address</notes>
      <domainId>10</domainId>
    </addressGroup>
    

    Sample JSON Input

    {
      "addressGroup": {
         "address1": " Plot No. 66",
         "address2": "Bagmane Tech Park",
        "city": "Bangalore",
        "state": "Karnataka",
        "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 Laker</contactName>
      <contactPhone>9878906754</contactPhone>
      <alternativePhone>687677868</alternativePhone>
      <notes>This is the 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": "Karnataka",
        "country": "India",
        "contactName": "Jim Laker",
        "contactPhone": "9878906754",
        "alternativePhone": "687677868",
        "notes": "This is the bangalore address",
     "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

    404 Not Found

    Address group ID not found in Service Now.

    400 Bad Request

    Indicates one of the following:

    • Address field(s) are empty. Enter a value int address1 and optionally address2.
    • City field is empty. Enter a value in the city field.
    • State field is empty. Enter a valid state.
    • Zip code field is empty. Enter a valid zip code.

    Modified: 2016-08-10