Email Notification Policy Tree

The API is used to fetch details of the email notification policy and of the location on which the policy is created. It also provides details of the child locations inheriting the policy.

API Calls

/V7/configuration/locationbased/emailnotification/policytree

Get Email Notification Policy Tree

Description Fetches details of the email notification policy and of the location on which the policy is created. It also provides details of the child locations inheriting the policy.
Who Can Execute? Superuser, Administrator, Operator, and Viewer.
Syntax
GET <Base_URL>/configuration/locationbased/emailnotification/policytree
Sample code
GET https://training.mojonetworks.com/new/webservice/V7/configuration/locationbased
/emailnotification/policytree
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 200.
The response is in the application/json format.
JSON Table

Attribute Data Type Description
type String The type of location on which the policy is created. The applicable values are:

  • folderlocation
  • floorlocation
id application/json Location identifier for the policy. The value is of the type Location Id json.
name String Name of the location.
accessibleToUser boolean A true or false value indicating whether the user has rights to access this location.
timezoneId int The JAVA timezone ID of the location.
locationTag String A user-defined tag for the location.
children application/json A list of IDs of the child locations. The ID is a JSON object.
children/type String Its the type of child location ID. The applicable values are:

  • locallocationid
  • remotelocationid

The remotelocationid ID type is applicable only in cluster environments.

children/id int The system-generated unique ID of the child location.
children/name String Name of the child location.
children/accessibleToUser boolean A true or false value indicating whether the user has rights to access this child location.
children/timezoneId int The JAVA timezone ID of the child location.
children/locationTag String A user-defined tag for the child location.
children/children application/json A list of IDs of the child locations. The ID is a JSON object.
children/policy application/json Details of the policy applied or inherited at the location.
children/inherited boolean A true or false value indicating if the child has inherited the policy or not.
policy application/json Details of the policy applied at the location.
policy/policyCreatedAtLocId application/json The ID of the location at which the policy has been defined. For details about the JSON, click Location ID.
policy/policyType String Type of the policy. Applicable value is EMAIL_NOTIFICATION_POLICY.
policy/notifiedEmails List of strings The email addresses that must be notified for events that have the sendEmail set to true.
inherited boolean A true or false value indicating whether the policy applied at the location is inherited or not.

Sample JSON
{
    "type": "PolicyLocation",
    "id": {
        "type": "locallocationid",
        "id": 0
    },
    "name": "Locations",
    "accessibleToUser": true,
    "timezoneId": "Asia/Kolkata",
    "locationTag": null,
    "children": [
        {
            "type": "PolicyLocation",
            "id": {
                "type": "locallocationid",
                "id": -1
            },
            "name": "Unknown",
            "accessibleToUser": true,
            "timezoneId": "Asia/Kolkata",
            "locationTag": null,
            "children": [],
            "policy": null,
            "inherited": true
        },
        {
            "type": "PolicyLocation",
            "id": {
                "type": "locallocationid",
                "id": 3
            },
            "name": "America",
            "accessibleToUser": true,
            "timezoneId": "Asia/Kolkata",
            "locationTag": null,
            "children": [
                {
                    "type": "PolicyLocation",
                    "id": {
                        "type": "locallocationid",
                        "id": 7
                    },
                    "name": "California",
                    "accessibleToUser": true,
                    "timezoneId": "Asia/Kolkata",
                    "locationTag": null,
                    "children": [],
                    "policy": null,
                    "inherited": true
                },
                {
                    "type": "PolicyLocation",
                    "id": {
                        "type": "locallocationid",
                        "id": 5
                    },
                    "name": "Chicago",
                    "accessibleToUser": true,
                    "timezoneId": "Asia/Kolkata",
                    "locationTag": null,
                    "children": [],
                    "policy": null,
                    "inherited": true
                },
                {
                    "type": "PolicyLocation",
                    "id": {
                        "type": "locallocationid",
                        "id": 6
                    },
                    "name": "Palo Alto",
                    "accessibleToUser": true,
                    "timezoneId": "Asia/Kolkata",
                    "locationTag": null,
                    "children": [],
                    "policy": null,
                    "inherited": true
                }
            ],
            "policy": null,
            "inherited": true
        },
        {
            "type": "PolicyLocation",
            "id": {
                "type": "locallocationid",
                "id": 2
            },
            "name": "Asia",
            "accessibleToUser": true,
            "timezoneId": "Asia/Kolkata",
            "locationTag": null,
            "children": [
                {
                    "type": "PolicyLocation",
                    "id": {
                        "type": "locallocationid",
                        "id": 8
                    },
                    "name": "India",
                    "accessibleToUser": true,
                    "timezoneId": "Asia/Kolkata",
                    "locationTag": null,
                    "children": [
                        {
                            "type": "PolicyLocation",
                            "id": {
                                "type": "locallocationid",
                                "id": 10
                            },
                            "name": "Bangalore",
                            "accessibleToUser": true,
                            "timezoneId": "Asia/Kolkata",
                            "locationTag": null,
                            "children": [],
                            "policy": null,
                            "inherited": true
                        },
                        {
                            "type": "PolicyLocation",
                            "id": {
                                "type": "locallocationid",
                                "id": 11
                            },
                            "name": "Mumbai",
                            "accessibleToUser": true,
                            "timezoneId": "Asia/Kolkata",
                            "locationTag": null,
                            "children": [],
                            "policy": null,
                            "inherited": true
                        },
                        {
                            "type": "PolicyLocation",
                            "id": {
                                "type": "locallocationid",
                                "id": 9
                            },
                            "name": "Pune",
                            "accessibleToUser": true,
                            "timezoneId": "Asia/Kolkata",
                            "locationTag": null,
                            "children": [],
                            "policy": null,
                            "inherited": true
                        }
                    ],
                    "policy": null,
                    "inherited": true
                }
            ],
            "policy": null,
            "inherited": true
        },
        {
            "type": "PolicyLocation",
            "id": {
                "type": "locallocationid",
                "id": 1
            },
            "name": "MSU Child",
            "accessibleToUser": true,
            "timezoneId": "Asia/Kolkata",
            "locationTag": null,
            "children": [],
            "policy": null,
            "inherited": true
        },
        {
            "type": "PolicyLocation",
            "id": {
                "type": "locallocationid",
                "id": 19
            },
            "name": "SwapnilD",
            "accessibleToUser": true,
            "timezoneId": "Asia/Kolkata",
            "locationTag": null,
            "children": [],
            "policy": null,
            "inherited": true
        },
        {
            "type": "PolicyLocation",
            "id": {
                "type": "locallocationid",
                "id": 17
            },
            "name": "VijayP",
            "accessibleToUser": true,
            "timezoneId": "Asia/Kolkata",
            "locationTag": null,
            "children": [],
            "policy": null,
            "inherited": true
        }
    ],
    "policy":  {
        "policyCreatedAtLocId": null,
        "policyType": "EMAIL_NOTIFICATION_POLICY",
        "notifiedEmails": []
    },
    "inherited": false
}