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 Information About Sites

    Use this API to retrieve information about all sites currently in Junos Space Service Now.

    URI

    https://[host]/api/juniper/servicenow/organization-management/sites (HTTP metod = POST)

    Consumes

    • application/vnd.juniper.servicenow.organization-management.organization+xml;version=1;charset=UTF-8
    • application/vnd.juniper.servicenow.organization-management.organization+json;version=1;charset=UTF-8

    Request Elements

    Element

    Type

    Description

    userName

    String

    User Name to authenticate the organization in Juniper Support System (JSS).

    password

    String

    Password to authenticate the orgnaization in JSS

    Note: The password should be Base64 encrypted.

    Produces

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

    Response Elements

    Element

    Type

    Description

    uri

    String

    URI of the collection of sites of an organization

    connectionStatus

    String

    Status of connection between the organization with JSS or Service Now partner in case Service Now is operating in End Customer mode)

    Possible values—Success, or the reason for failure

    userName

    String

    User name to authenticate the site in JSS or Service Now partner

    isConnectedMember

    Boolean

    Flag to indicate if the organization belongs to an end customer

    • Possible values—Organzation belongs to a

    sites

    site

    Collection of sites in the orgnaization

    size

    Integer

    Number of sites present in the organization

    site

    site

    A site

    siteId

    String

    ID of the site

    Sample Input

    Sample XML Input

    <organization>
        <userName>user@example.com</userName>
        <password> password</password>
    </organization>
    

    Sample JSON Output

    {
      "organization": {
        "userName": "user@example.com",
        "password": " password"
      }
    }
    

    Sample Output

    Sample XML Output

    <organization uri="/api/juniper/servicenow/organization-management/sites">
        <connectionStatus>Success</connectionStatus>
        <userName>user@example.com</userName>
        <isConnectedMember>false</isConnectedMember>
        <sites size="8">
            <site>
                <siteId>CJ18841</siteId>
            </site>
            <site>
                <siteId>00001604</siteId>
            </site>
            <site>
                <siteId>00001697</siteId>
            </site>
            <site>
                <siteId>17151</siteId>
            </site>
            <site>
                <siteId>AIS-105-1</siteId>
            </site>
            <site>
                <siteId>CJ481356</siteId>
            </site>
            <site>
                <siteId>CJ63734</siteId>
            </site>
            <site>
                <siteId>N49825</siteId>
            </site>
        </sites>
    </organization>
    

    Sample JSON Output

    {"organization":
    {
        "@uri":"/api/juniper/servicenow/organization-management/sites",
        "connectionStatus":"Success",
        "userName":"user@example.com",
        "isConnectedMember":false,
        "sites":
            {
                "@size":"8","site":[
                    {"siteId":"CJ18841"},
                    {"siteId":"00001604"},
                    {"siteId":"00001697"},
                    {"siteId":17151},
                    {"siteId":"AIS-105-1"},
                    {"siteId":"CJ481356"},
                    {"siteId":"CJ63734"},
                    {"siteId":"N49825"}
                ]
            }
        }
    }

    Response Status Code

    Message

    Description

    204 No Content

    No Sites found.

    400 Bad Request

    One of the following:

    • No user name specified in the input.
    • User name is too long. Maximum allowed characters for user name is 128.
    • No password specified in the input.
    • Password is too long. Maximum allowed characters for password is 32.

    Modified: 2016-08-11