api-object-access

Location-Based Email Configuration

Location-Based Email Configuration is an Alert Notification Method, used to inform a user about the raised alerts. A notification email is sent to the user on the configured Email Address.

JSON Table

Attribute Data Type Description
policyCreatedAtLocId application/json ID of the location where policy is created. The value is of the type Location ID JSON.
policyType enum Policy type used to identify policy, for event configuration it is EVENT_CONFIGURATION_POLICY
notifiedEmails String E-mail addresses of the users that need to be notified on occurrence
of certain events at the selected location.

Copy Sample JSON
Sample JSON
{
	"policyCreatedAtLocId": {
		"type": "locallocationid",
		"id": 0
	},
	"policyType": "EMAIL_NOTIFICATION_POLICY",
	"notifiedEmails": ["[email protected]"]
}
API Calls

/V5/configuration/locationbased/email

/V5/configuration/locationbased/email

/V5/configuration/locationbased/email

/V5/configuration/locationbased/email

Get Location-Based Email Configuration

Description The API is used to retrieve email configuration details.
Syntax
GET <Base_URL>/configuration/locationbased/email?isdefault=<value>&locationid=<value>&nodeid=<value>

Here,

  • isdefault

    When we pass this parameter as true then system default configuration for that location is return else whatever user has defined is returned. It takes a boolean value. The default value is false.

  • locationid

    It is an integer value specifying the location for which the Location-Based Email settings are Configured. To retrieve the value for the Location ID refer Location JSON. It takes an integer value.

  • nodeid

    A system-generated unique ID for the child server in a cluster environment. The value for this parameter will be same as that of the childId attribute in the Location JSON. It takes an integer value.

Sample code
GET https://training.mojonetworks.com/new/webservice/v5/configuration/locationbased
/email?isdefault=false&locationid=-1&nodeid=0
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 configuration details like location details, policy type, and configured email
address are retrieved in the application/json format. Policy type is EMAIL_NOTIFICATION_POLICY in this case.

Save Location-Based Email Configuration

Description The API is used to save or update email configurations.
Syntax
PUT <Base_URL>/configuration/locationbased/email?locationid=<value>
&nodeid=<value>

Here,

  • locationid

    It is an integer value specifying the location for which the Location-Based Email settings are Configured. To retrieve the value for the Location ID refer Location JSON. It takes an integer value.

  • nodeid

    A system-generated unique ID for the child server in a cluster environment. The value for this parameter will be same as that of the childId attribute in the Location JSON. It takes an integer value.

Sample code
PUT https://training.mojonetworks.com/new/webservice/v5/configuration/locationbased
/email?locationid=0&nodeid=0
Request Body This API call requires the details of the email configurations to be updated, which is passed as parameters in the request body. The parameters are passed in the application/json format.

A sample request body is as follows:

{
	"policyCreatedAtLocId": {
		"type": "locallocationid",
		"id": 0
	},
	"policyType": "EMAIL_NOTIFICATION_POLICY",
	"notifiedEmails": ["[email protected]"]
}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the details of the updated email configuration. The response is in the application/json format.

Customize Location-Based Email Configuration

Description The API is used to customise email configurations.
Syntax
POST <Base_URL>/configuration/locationbased/email?locationid=<value>&nodeid=<value>

Here,

  • locationid

    It is an integer value specifying the location for which the Location-Based Email settings are Configured. To retrieve the value for the Location ID refer Location JSON. It takes an integer value.

  • nodeid

    A system-generated unique ID for the child server in a cluster environment. The value for this parameter will be same as that of the childId attribute in the Location JSON. It takes an integer value.

Sample code
POST https://training.mojonetworks.com/new/webservice/v5/configuration/locationbased/email?locationid=-1&nodeid=0
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 body contains the details of the customized email configuration. The response is in the application/json format.

Delete Location-Based Email Configuration

Description The API is used to delete email configuration.
Syntax
DELETE <Base_URL>/configuration/locationbased/email?locationid=<value>&nodeid=<value>

Here,

  • locationid

    It is an integer value specifying the location for which the Location-Based Email settings are Configured. To retrieve the value for the Location ID refer Location JSON. It takes an integer value.

  • nodeid

    A system-generated unique ID for the child server in a cluster environment. The value for this parameter will be same as that of the childId attribute in the Location JSON. It takes an integer value.

Sample code
DELETE https://training.mojonetworks.com/new/webservice/v5/configuration/locationbased/email?locationid=-1&nodeid=0
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 204. The response body does not contain any other information.

Test APIs

Description This API is used to fetch the APs that match the specified filter criteria from the allowed locations for the logged-in user. If no filters are specified, all the APs from the allowed locations are fetched. However, this API is not supported in a server cluster environment.

Note: Do not use this API to fetch more than 100 devices. For fetching larger number of devices, consider using the Get Paged List of APs API.

User Privileges Users with the following roles can call this API: superuser, administrator, and operator.

Request Body Parameters
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 body contains the details of the APs that match the filter criteria. The response is in the application/json format. Click AP to view the complete detais of the JSON along with a sample output.

Error codes
If the API call is successful, the HTTP response status is 200.

Syntax
GET /devices/aps
Sample code
GET https://training.mojonetworks.com/new/webservice/v2/devices/aps
GET
https://training.mojonetworks.com/new/webservice/v2/devices/aps?macaddress=00:11:74:33:23:12&macaddress=00:11:74:45:12:21
GET
https://training.mojonetworks.com/new/webservice/v2/devices/aps?capability=49&locationid=10&locationid=12&sortcolumn=devicename&sortascending=false
URL Parameters This API call takes optional URL parameters to filter the list of APs to be fetched and the column on which the output must be sorted. AP Filter Parameters lists the parmeter names, datatypes, applicable values, and whether the results can be sorted based on the parameter.
Query Parameters This API call takes optional URL parameters to filter the list of APs to be fetched and the column on which the output must be sorted. AP Filter Parameters lists the parmeter names, datatypes, applicable values, and whether the results can be sorted based on the parameter.
Response Body If the API call is successful, the HTTP response status is 200. The response body contains the details of the APs that match the filter criteria. The response is in the application/json format. Click AP to view the complete detais of the JSON along with a sample output.