archive-reports

Archive Reports

When a server cluster is created and a child server is mounted on a mount point, the child server retains the policies that were previously applied to it. It does not inherit the parent server policies, by default. If you want to apply the parent server policies to child servers, you must navigate to the individual policy and inherit the policy from the parent server. The same applies to location time zone policy.

JSON Table

Attribute Data Type Description
id int System-generated ID of the archived report.
reportName String Name of the report.
reportGenerationTime long The time in milliseconds when the report was generated.
format String The format in which the report is generated. The applicable values are
PDF, XML, and HTML.
sizeKb int The size in kilobytes of the archived report.
userId int System-generated ID of the user who generated the report.
locationName String Name of the location where the report was generated.
userFirstName String The first name of the user who generated the report.
userLastName String The last name of the user who generated the report.
userLoginName String The log-in name of the user who generated the report.
customerFirstName String The first name of the customer for whom the report is generated.
deleteAfterDays long The number of days after which the archived report will be deleted.
The default value is 0, which indicates that the archived report will
never be deleted.
fromTime long The time from which the archived report will start collecting data.
The time unit is milliseconds.
toTime long The time until which the archived report will contain data. The time
unit is milliseconds.
clusterChildId int System-generated ID of the cluster child. This attribute is used only
in cluster environments.

Copy Sample JSON
Sample JSON
[
    {
        "id": 2,
        "reportName": "Airspace Risk Assessment",
        "reportGenerationTime": 1518683400169,
        "format": "PDF",
        "sizeKb": 80,
        "userId": 1,
        "locationName": "//Locations/ATN1-MountPoint",
        "userFirstName": "System",
        "userLastName": "Superuser",
        "userLoginName": "admin",
        "customerFirstName": "System",
        "deleteAfterDays": 0,
        "fromTime": 1518679805984,
        "toTime": 1518683405984,
        "clusterChildId": 0
    },
    {
        "id": 3,
        "reportName": "Airspace Risk Assessment",
        "reportGenerationTime": 1518687000170,
        "format": "PDF",
        "sizeKb": 80,
        "userId": 1,
        "locationName": "//Locations/ATN1-MountPoint",
        "userFirstName": "System",
        "userLastName": "Superuser",
        "userLoginName": "admin",
        "customerFirstName": "System",
        "deleteAfterDays": 0,
        "fromTime": 1518683406285,
        "toTime": 1518687006285,
        "clusterChildId": 0
    },
    {
        "id": 4,
        "reportName": "Airspace Risk Assessment",
        "reportGenerationTime": 1518690600244,
        "format": "PDF",
        "sizeKb": 80,
        "userId": 1,
        "locationName": "//Locations/ATN1-MountPoint",
        "userFirstName": "System",
        "userLastName": "Superuser",
        "userLoginName": "admin",
        "customerFirstName": "System",
        "deleteAfterDays": 0,
        "fromTime": 1518687007586,
        "toTime": 1518690607586,
        "clusterChildId": 0
    },

    {
        "id": 172,
        "reportName": "Airspace Risk Assessment",
        "reportGenerationTime": 1519021800162,
        "format": "PDF",
        "sizeKb": 80,
        "userId": 1,
        "locationName": "//Locations/ATN1-MountPoint",
        "userFirstName": "System",
        "userLastName": "Superuser",
        "userLoginName": "admin",
        "customerFirstName": "System",
        "deleteAfterDays": 0,
        "fromTime": 1519018205937,
        "toTime": 1519021805937,
        "clusterChildId": 0
    }
]
API Calls

/V5/reports/fetch/archivedreport

/V5/reports/archived

<Base_URL>/V2/analytics/associationdata/{startdate}/{enddate}

/V5/reports/archived/{reportid}/{name}

/V5/reports/archived/{reportid}

/V5/reports/archived

Get an Archived Report

Description This API is used to fetch a report that is created and archived in Mojo Server or
Arista Cloud Services.
Users with the roles can call this API:superuser, administrator, operator, and viewer.
Syntax
GET <Base_URL>/reports/fetch/archivedreport?archivedreport=<value>

Here,

  • archivedreport

    It specifies the details of the archived report to be fetched. The parameter
    value is specified in the application/json format. The parameter value should be in encoded format.

Sample code
GET https://training.mojonetworks.com/new/webservice/V5/reports/fetch
/archivedreport?archivedreport=%7B%0A%09%22id%22%3A%205%2C%0A%09%22reportName
%22%3A%20%22Airspace%20Risk%20Assessment%22%2C%0A%09%22reportGenerationTime
%22%3A%201518683400169%2C%0A%09%22format%22%3A%20
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 a partial URL to access the archived report. This partial URL
must be appended to:

https://<Mojo_Server_IP>/new/

Where <Mojo_Server_IP> is the IP address or FQDN of the Mojo Server. If you are
using Arista Cloud Services, then use the URL provided by the Mojo Networks Support team
instead of the server IP.
A sample response is as follows:

api/sfiles?id=ba4b8689-f7d7-477a-818d-822f75d452da&dwnlfnpre=
WM_Archived_Report_1_5_f48be30d-d8f3-4d92-bc46-e93f654314b0_20180219131146

The resulting URL to access the association analytics is as follows:

https://training.mojonetworks.com/new/webservice/sfiles?id=
ba4b8689-f7d7-477a-818d-822f75d452da&dwnlfnpre=WM_Archived_Report
_1_5_f48be30d-d8f3-4d92-bc46-e93f654314b0_20180219131146

Get all Archived Reports

Description API is used to fetch details of all the archived reports from Mojo Server or
Arista Cloud Services.
Users with the roles can call this API:superuser, administrator, operator, and viewer.
Syntax
GET <Base_URL>/reports/archived
Sample code
GET https://training.mojonetworks.com/new/webservice/v5/reports/archived
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 all the archived reports. The response is in the application/json format.

Put 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.

Put 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.

Rename an Archived Report

Description This API is used to rename an archived report in Mojo Server or Arista Cloud Services.
Users with the roles can call this API: superuser, administrator, operator and viewer.
Syntax
POST <Base_URL>/reports/archived/{reportid}/{name}

Here,

  • reportid

    Is an integer value indicating the ID of the archived report
    that has to be renamed. For example, 21.

  • name

    Is a string value indicating the new name for the archived report.
    For example, RiskReport122014.

Sample code
POST https://training.mojonetworks.com/new/webservice/v5/reports/archived/
21/RiskReport122014
Request Body This API call requires the details of the archived report to be renamed,
which is passed as parameters in the request body. The parameters are passed
in the application/json format. You must provide the appropriate values for the
following JSON attributes:

  • id
  • reportName

A sample request will have a structure as follows:

[{
List of archive report with mandatory attributes.
}]
Response Body If the API call is successful, the HTTP response status is 204.
The response body does not contain any information.

Delete an Archived Report

Description This API is used to delete an archived report from Mojo Server or Arista Cloud Services.
Users with the roles can call this API:superuser, administrator, operator and viewer.
Syntax
DELETE <Base_URL>/reports/archived/{reportid}

Here,

  • reportid

    Is an integer value indicating the ID of the archived report
    that has to be deleted. For example, 21.

Sample code
DELETE https://training.mojonetworks.com/new/webservice/V5/reports/archived/1
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 information.

Delete Archived Reports

Description This API is used to delete a list of archived reports from Mojo Server or Arista Cloud
Services.
Users with the roles can call this API:superuser, administrator, operator and viewer.
Syntax
DELETE <Base_URL>/reports/archived?reportid=<value>

Here,

  • reportid

    Is a integer value indicating the ID of the archived report that have to be deleted.
    This is a matrix parameter, so for each archived report to be deleted, you must provide
    a list of pair that is separated by a semicolon. For example, reportid=2; reportid=13; reportid=21.

Sample code
DELETE https://training.mojonetworks.com/new/webservice/v5/reports/
archived;reportid=2;reportid=13;reportid=21
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 information.