Debug-Logs Session

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

JSON Table

Attribute Data Type Description
previousLink
nextLink
totalCount
deviceDebugLogSessions
deviceDebugLogSessions/sessionId int The ID to identify the debug logs session.
deviceDebugLogSessions/sensorMacaddress String
deviceDebugLogSessions/macaddress String The macaddress of the device.
deviceDebugLogSessions/deviceType
deviceDebugLogSessions/userId
deviceDebugLogSessions/state enum The debug log session state.  Possible values PENDING, STARTED, STOPPED, FAILED, ABORTED
deviceDebugLogSessions/startTime long Start time in milliseconds.
deviceDebugLogSessions/endTime long End time in milliseconds.
deviceDebugLogSessions/fileName String The debug log bundle file name.
deviceDebugLogSessions/fileSize long Size of the bundle in bytes.

Copy Sample JSON
Sample JSON
{
    "previousLink": null,
    "nextLink": "https://webapps-parentmwm.airtightnw.com/new/webservice/V6/troubleshoot/devices/debuglogsessions?startindex=1&pagesize=10",
    "totalCount": 1,
    "deviceDebugLogSessions": [
        {
            "sessionId": 1,
            "sensorMacaddress": "88:DC:96:69:E8:71",
            "macaddress": "88:DC:96:69:E8:71",
            "deviceType": "SENSOR",
            "userId": 1,
            "state": "STOPPED",
            "startTime": 1547535477459,
            "endTime": 1547535499341,
            "fileName": "Sensor-logs-88_DC_96_69_E8_71-20190115065757459266.tgz",
            "fileSize": 379904
        }
    ]
}
API Calls

/V6/troubleshoot/devices/debuglogsessions

/V6/troubleshoot/devices/debuglogsessions/{sessionid}/logs

/V6/troubleshoot/devices/{macaddress}/debuglogsessions

/V6/troubleshoot/devices/debuglogsessions/{sessionid}/logs

Fetch the Debug Log Sessions for All Devices

Description Fetches the debug log sessions for all devices.
Who Can Execute? Superuser, Administrator, and Operator.
Syntax
GET <Base_URL>/troubleshoot/devices/debuglogsessions
Sample code
GET https://training.mojonetworks.com/new/webservice/V6/troubleshoot/devices
/debuglogsessions
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 debug logs session for all devices. The response is
in the application/json format.

Fetch the Debug Log Bundle File for a Session ID

Description Fetches the debug log bundle file for a session ID.
Who Can Execute? Superuser, Administrator, and Operator.
Syntax
GET <Base_URL>/troubleshoot/devices/debuglogsessions/{session_id}/logs
Sample code
GET https://training.mojonetworks.com/new/webservice/V6/troubleshoot/devices
/debuglogsessions/1/logs
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 debug log bundle file for the specified ID. The response is
in the application/json format.

Start a Debug Log Bundle

Description Sends a request to an AP, to start generating a debug bundle.
Who Can Execute? Superuser, Administrator, and Operator.
Syntax
POST <Base_URL>/troubleshoot/devices/{macaddress}/debuglogsessions<
Sample code
POST https://training.mojonetworks.com/new/webservice/V6/troubleshoot
/devices/001174567887/debuglogsessions
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 debug log session. The response is
in the application/json format.

Delete the Debug Log Bundle File for a Session ID

Description Deletes the debug log bundle file for the specified session ID.
Who Can Execute? Superuser, Administrator, and Operator.
Syntax
GET <Base_URL>/troubleshoot/devices/debuglogsessions/{session_id}/logs
Sample code
GET https://training.mojonetworks.com/new/webservice/V6/troubleshoot/devices
/debuglogsessions/1/logs
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 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.

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.