Capture Session

Capture Session lies under the SSID profile management of troubleshooting. It allows you to configure the ways in which you want to capture packet traces. Wireless Manager automatically captures packet traces when an AP detects connection failure. To access the packet traces that have been captured, you need to access it from connection logs under Mojo Aware. For each client, a minimum number of five latest traces are retained. The file names of the traces depend on the MAC address of the client, the AP VAP and the timestamp of the packet capture session.

API Calls

/V5/connectionlogs/sessions/{sessionId}

/V5/connectionlogs/sessions

V5/connectionlogs/session/{startIndex}/{pageSize}

V5/connectionlogs/sessions/{sessionId}/logs

/V5/packetcaptures/sessions

/V5/packetcaptures/sessions/{sessionId}

/V5/packetcaptures/sessions/{sessionId}/capturefiles

/V5/connectionlogs/sessions

/V5/connectionlogs/sessions/{sessionId}

/V5/packetcaptures/sessions

/V5/packetcaptures/sessions/{sessionId}

/V5/packetcaptures/sessions/{sessionId}

/V5/connectionlogs/sessions/{sessionId}

Get A Client Connection Log Session

Description This API is used to get a connection log session using the session ID.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
Syntax
GET <Base_URL>/connectionlogs/sessions/{sessionId}

Here,

  • sessionId

    It is the ID of the connection log session. It takes an integer value.

Sample code
GET https://192.168.55.179/new/webservice/v5/connectionlogs/sessions/2

Here,

  • nodeId

    It specifies the child server. It takes integer value.

  • locationId

    It specifies the id of the location. It takes integer value.

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 connection log session.
The response is in the application/json format.

Get Client Connection Log History

Description This API fetches the guest user account and profile details of all the guest users.
Guest Manager users with the Administrator role or the Guestbook Operator role can access this API.
Users with the Guestbook Operator role must have access to the portal from which the guest user accounts for the Guestbook plug-in are fetched.
Syntax
GET <Base_URL>/connectionlogs/sessions
Sample code
GET https://192.168.55.179/new/webservice/v5/connectionlogs/sessions?nodeid=0&locationid=1
  • nodeId

    It is required to for specifying a child server.

  • locationId

    It specifies the id of the location. This parameter takes integer value.

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 connection log sessions. The response is in the application/json format

Get A Packet Capture Session

Description This API is used to get a packet capture session, running or stopped, using the session ID.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
Syntax
GET <Base_URL>/packetcaptures/sessions/{sessionId}

Here,

  • sessionId

    It is the id of the packet capture session. It takes an integer value.

Sample code
GET https://192.168.55.179/new/webservice/v5/packetcaptures/sessions/2?nodeid=0&locationid=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 200.
The response body contains the details of the packet capture session. The response is in the application/json format.

Get A List Of Packet Capture Sessions

Description This API is used to get a list of capture sessions.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
Syntax
GET <Base_URL>/packetcaptures/sessions
Sample code
GET https://192.168.55.179/new/webservice/v5/packetcaptures/sessions?nodeid=0&locationid=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 200.
The response body contains the details of the packet capture sessions.
The response is in the application/json format.

Start A Client Connection Log Session

Description This API is used to start a connection log session for a client.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
Syntax
POST <Base_URL>/connectionlogs/session
Sample code
POST https://training.mojonetworks.com/new/webservice/v5/connectionlogs/sessions?nodeid=0&locationid=1
Request Body This API call requires the MAC address of the device for which the logs have to be collected,
the timeout interval, and the box ID of the capturing device.
The parameters are specified in application/json format in the request body.
A sample request JSON is as follows:

{
"deviceMacAddress":"40:33:1A:59:F4:40",
"timeout":5,
"capturingDeviceBoxIds":[1]
}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the details of the connection log session.
The response is in the application/json format

Stop A Client Connection Log Session

Description This API is used to stop connection log session running for a client.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
Syntax
POST <Base_URL>/connectionlogs/sessions/{sessionId}

Here,

  • sessionId

    It is the Id of the session that you want to stop. It takes integer value.

  • nodeId

    It is required for specifying a child server. The parameter takes integer value.

  • locationId

    It specifies the Id of the location. The parameter takes integer value.

Sample code
POST https://training.mojonetworks.com/new/webservice/v5/connectionlogs/sessions/1?nodeid=0&locationid=1
Request Body This API takes optional URL parameters nodeid and locationid.
The sample JSON is:

{
	"type": "clientconnectionlog",
	"state":"STOPPED"
}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the details of the connection log session.
The response is in the application/json format

Start A Packet Capture Session

Description This API is used to start a packet capture session on a sensor, AP, or client.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
Syntax
POST <Base_URL>/packetcaptures/sessions

Here,

  • nodeId

    It is required for specifying a child server. The parameter takes integer value.

  • locationId

    It specifies the Id of the location where the packet capture must be initiated. The parameter takes integer value.

Sample code
POST https://training.mojonetworks.com/new/webservice/v5/packetcaptures/sessions?nodeid=0&locationid=1
Request Body This request body contains the packet capture information.
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the details of the packet capture session.
The response is in the application/json format.

Stop A Packet Capture Session

Description This API is used to stop a packet capture session.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
Syntax
POST <Base_URL>/packetcaptures/sessions/{sessionId}

Here,

  • sessionId

    It is the Id of the packet capture session that you want to stop. It takes an integer value.

  • nodeId

    It is required for specifying a child server. The parameter takes integer value.

  • locationId

    It specifies the Id of the location where the packet capture must be initiated. The parameter takes integer value.

Sample code
POST https://training.mojonetworks.com/new/webservice/v5/packetcaptures/sessions/1?nodeid=0&locationid=1
Request Body This API call takes the following JSON in the request body:

{
"type": "livepacket",
"state": "STOPPED"
}
Response Body If the API call is successful, the HTTP response status is 200.
The response body contains the details of the packet capture session.
The response is in the application/json format.

Delete A Packet Capture Session

Description This API is used to delete a packet capture session.
Before deleting the packet capture session, It’s mandatory to stop the live session. You can stop the live session using call “Stop Packet Capture Session”.
Users with the following roles can call this API: superuser, administrator, operator, and viewer.
Syntax
DELETE <Base_URL>/packetcaptures/sessions/{sessionId}

Here,

  • sessionId

    It is the ID of the session that you want to delete. It takes an integer value.

  • nodeId

    It is required for specifying child server. It takes an integer value.

  • locationId

    It specifies the ID of the location. Takes up an integer value.

  • traceType

    It is used to specify the type of packet capture. If packet capture is not specified it deletes both the type of packet captures. It takes String values. The applicable values are WIRELESS_PACKET_CAPTURE and WIRED_PACKET_CAPTURE.

Sample code
DELETE https://training.mojonetworks.com/new/webservice/v5/packetcaptures/sessions/3?nodeid=0&locationid=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.

Get Logs of a Connection Log Session

Description Fetches logs of a connection log session.
Who Can Execute? Superuser, Administrator, Operator, and Viewer.
Syntax
GET <Base_URL>/connectionlogs/sessions/{sessionId}/logs
  • sessionId

    It is the ID of the connection log session. It takes an integer value.

Sample code
GET https://training.mojonetworks.com/new/webservice/V3/connectionlogs/sessions/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 response is in the application/json format.

Get Paged List of Connection Logs Session

Description Retrieves the paged list of client connection log sessions along with their details.
Who Can Execute? Superuser, Administrator, Operator, and Viewer.
Syntax
GET <Base_URL>/V5/connectionlogs/session/{startIndex}/{pageSize}?sortcolumn=<value>&sortascending=<value>&filter=<value>
  • startIndex

    An integer value indicating the start index for the list of clients to be fetched. It is a mandatory parameter.

  • pageSize

    An integer value indicating the end index for the list of clients to be fetched.
    The maximum page size is 1000. It is a mandatory parameter.

  • sortcolumn

    An optional parameter used to sort the columns. It takes a string value. The default value is boxId.

  • sortascending

    An optional parameter used to specify sort direction. It takes a boolean value. The default value is true.

  • filter

    An optional parameter to filter the results. Click Filter to view details of how filters need to be specified
    in the URL. For possible names of property attribute, datatypes, applicable values, and whether the results can be sorted based on the parameter click Capture Session Filter Parameters.

Sample code
GET https://training.mojonetworks.com/new/webservice/V5/connectionlogs/session/0/10?sortcolumn=fileName&sortascending=false&filter=%7B%0A%0A%09%22property%22%3A%20%22
starttime%22%2C%0A%0A%09%22value%22%3A%20%5B1548155018437%5D%2C%0A%0A%09%22
operator%22%3A%20%22%3D%22%0A%0A%7D
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 paged list of client connection log sessions along with their details. The response is in the application/json format.

Get Captured Files

Description Fetches packet capture file information for a packet capture session.
Who Can Execute? Superuser, Administrator, Operator, and Viewer.
Syntax
GET <Base_URL>/packetcaptures/sessions/{sessionId}/capturefiles
  • sessionId

    It is the ID of the connection log session. It takes an integer value.

Sample code
GET https://training.mojonetworks.com/new/webservice/V5/packetcaptures/sessions/1
/capturefiles
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 response is in the application/json format.

Delete a Connection Logs Session

Description Deletes a connection log session
Who Can Execute? Superuser, Administrator, and Operator.
Syntax
DELETE <Base_URL>/connectionlogs/sessions/{sessionId}
  • sessionId

    It is the ID of the connection log session. It takes an integer value.

Sample code
DELETE https://training.mojonetworks.com/new/webservice/V5/connectionlogs/sessions/2
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.
JSON Table

Parameter Data Type Description
type String .
captureType String .
deviceType String The applicable values are: DEVICE_AP, DEVICE_CLIENT and DEVICE_AIRTIGHT
(sensor).
startTime int The time when the capture/log session was started.
stopTime int The time when the capture/log session was stopped.
fileName String The name of the file.
state String The session status.
omnipeekCommand String The omnipeek command for the packet capture.
wiresharkCommand String The wireshark command for the packet capture.
sessionId int The ID of the capture/log session.
capturingDeviceMacaddress String The MAC address of the device capturing the packet.
deviceProtocol String The protocol of the device. For DEVICE_AP this is set to the protocol
of the device. For example, A. For DEVICE_AIRTIGHT this is set to SENSOR
and for DEVICE_CLIENT this is set to CLIENT.
dviceMacaddress String The MAC address of the device.

Sample JSON
{
    "type": "clientconnectionlog",
    "captureType": "CONNECTION",
    "deviceType": "DEVICE_CLIENT",
    "startTime": 1519118098620,
    "stopTime": 0,
    "fileName": "cl_40:33:1A:59:F4:40_20180220091458620900.log",
    "locationId": {
        "type": "locallocationid",
        "id": 1
    },
    "packetTraceType": "NOT_APPLICABLE",
    "state": "RUNNING",
    "fileSize": 0,
    "sessionId": 2,
    "capturingDeviceMacAddress": null,
    "deviceProtocol": "CLIENT",
    "deviceMacaddress": "40:33:1A:59:F4:40"
}