Skip to content

Lynn Monitoring API

It provides access to data exploitation to understand, for example, Lynn's overall status and its connector, the health status of all incoming requests from various channels to Lynn's connector, and the health status of all outgoing requests from Lynn to the various channels configured for the application.

Lynn Monitoring API Authentication Token Generation

One of the necessary requirements for using the Lynn Monitoring API is to verify that the consumer (user or service) is authorized to use the API. To do this, the first thing that must be done is to obtain the authentication token.

Key Points:

  • Protected Method: No, it can be queried directly.

Route:

/api/LynnReporting/CreateToken

Postman Example:

Method: POST

Parameter Table:

Parameter Location Description
BODY

{

"accessToken": "string",

"accessTokenSecret": "string",

"tenant": “number”

}

accessToken

Text string that is part of the authentication parameters, generated when creating tenant security credentials, and cannot be modified. Example: 902eeeeee9752f1.

Note: Similar to a user.

accessTokenSecret

Text string that is part of the authentication parameters, generated when creating tenant security credentials, and cannot be modified. Example: 66aaaaa1b-4da4-4005-9883-44b8000006d5.

Tenant

Numerical identifier of the tenant. Obtained from the Lynn graphical interface.

Responses

HTTP Code Description Response Body
200 Success

Note: This response should be included in the header of the following requests to handle security. Example:

Variable

Authorization: bearer eyJhbGciOiJIUzoEzKw4ly8jgmmAoxJbg

JSON Response

{

"token": "eIkpXVCJ9.eyJhefWYXY8888884YxLxrCWKVeY4N Us_2c239NG4"

}

401 Unauthorized No Response.

Execute Tenant Status Report

Displays the overall status of Lynn and its connector.

Key Points:

  • Protected Method: No, direct querying is allowed.

Route:

/api/LynnReporting/Status/2793

Postman Example:

Method: POST

Responses

HTTP Code Description Response Body
200 Success

InternalReponseTime (int - milliseconds) Average response time of Lynn.

Status (string)

up: Lynn's servers are operating normally.

down: Lynn's servers are not available.

TrafficInformation (string): Traffic information for the queried tenant.

Sessions (int): Number of sessions grouped by division, channel, and service.

Division (int): Lynn's division where the sessions have been generated.

Channel (int): Channel identifier.

Service (int): Service identifier.

ConnectorStatus:

up: Lynn's connector to the channels is working normally. down: Lynn's connector is not available

401 Unauthorized No Response.

Execute Inbound Health Detail Report

Displays the health status of all incoming requests from various channels to Lynn's connector.

Key Points:

  • Protected Method: No, direct querying is allowed.

Route:

/api/LynnReporting/ExecuteReport/2793/29CDB989-6221-4742-96CA-1A878545B5A3

Postman Example:

Parameter Table:

Parameter Location Description
BODY

{

"startDate" : "2023-08-10 16:51:14",

"endDate" : "2023-08-14 18:00:35",

"size" : 10000,

"lastDocument": " "

}

startDate (Requerido):Start date of the query.

endDate (Required): End date of the query.

size: Number of requested records.

lastDocument: Id to query the next page.

Responses

HTTP Code Description Response Body
200 Success

isValid (boolean)

Request validation, True if the body is valid.

executionTime (ms)

Time taken to perform the query.

idReport (string)

Guid of the queried report.

nameVisualization (string) Report name.

totalDocument (int)

Total documents found.

pageCount (Disabled for this report).

lastDocument (string)

Identifier id to query the next page.

Id (string)

Guid identifying Lynn's session.

Date (date - string)

Date of health record.

Channel (int)

Communication channel identifier.

Service (int)

Lynn's service number.

Client (string)

Name of the user who generated the session.

ReponseTime (double - milliseconds)

Time taken by Lynn's connector to process the message.

ReponseCode (int)

Response code for the message processed by Lynn's connector.

Error (string)

Error while processing the message.

BotLatency (int - milliseconds)

Time taken for the message to reach Lynn's connector.

Payload (string)

Message received by Lynn's connector and sent through the communication channel.

Origin (string)

Origin from where the message was sent.

401 Unauthorized No Response.

Execute Inbound Health Summary Report

Displays a detailed summary of the state of incoming requests to Lynn's connector from various channels. These requests will be organized into groups based on the entry channel, the requested service type, their origin, and the obtained response code.

Key Points:

  • Protected Method: No, direct querying is allowed.

Route:

/api/LynnReporting/ExecuteReport/2793/7B9D4B85-0176-428B-BFED-9618940D473A

Ejemplo Postman:

Method: POST

Parameter Table:

Parameter Location Description
BODY

{

"startDate":"2023-08-10 16:51:14",

"endDate": "2023-08-14 18:00:35",

"size": 10000,

"lastDocument": ""

}

startDate (Required) Start date of the query.

endDate (Required) End date of the query.

size Number of requested records.

lastDocument Id to query the next page.

Responses

HTTP Code Description Response Body
200 Success

isValid (boolean)

Request validation, True if the body is valid.

executionTime (ms)

Time taken to perform the query.

idReport (string)

Guid of the queried report.

nameVisualization (string) Report name.

totalDocument (int)

Total documents found.

pageCount (Disabled for this report).

lastDocument (string)

Identifier id to query the next page.

Id (string)

Guid identifying Lynn's session.

ReponseCode (int)

Response code for the message processed by Lynn's connector.

Channel (int)

Communication channel identifier.

Service (int)

Lynn's service number.

Origin (string)

Origin from where the message was sent.

Count (string)

Total requests with the indicated ResponseCode.

AvegareReponseTime (double - milliseconds)

Average time for the total requests, taken by Lynn's connector to process the message for all messages.

AvegareBotLatency (int - milliseconds)

Average time for the total requests, taken for the message to reach Lynn's connector.

401 Unauthorized No Response.

Execute Outbound Health Detail Report

Displays the health status of all outgoing requests from Lynn to the various channels configured for the application.

Key Points:

  • Protected Method: No, direct querying is allowed.

Route:

/api/LynnReporting/ExecuteReport/2793/69FD4E08-7BD1-45B3-9370-1EF0DC774EB5

Postman Example:

Method: POST

Parameter Table:

Parameter Location Description
BODY

{

"startDate": "2023-08-10 16:51:14",

"endDate": "2023-08-14 18:00:35",

"size": 10000,

"lastDocument": " "

}

startDate (Required): Start date of the query.

endDate (Required): End date of the query.

size: Number of requested records.

lastDocument: Id to query the next page.

Responses

HTTP Code Description Response Body
200 Success

isValid (boolean)

Request validation, True if the body is valid.

executionTime (ms)

Time taken to perform the query.

idReport (string)

Guid of the queried report.

nameVisualization (string)

Report name.

totalDocument (int)

Total documents found.

pageCount (Disabled for this report).

lastDocument (string)

Identifier id to query the next page.

Id (string)

Guid identifying Lynn's session.

Date (date - string)

Date of health record.

Channel (int)

Communication channel identifier.

Service (int)

Lynn's service number.

Client (string)

Name of the user who generated the session.

ReponseTime (double - milliseconds)

Time taken by the service to process the request.

ReponseCode (int)

Response code received from the queried service.

Error (string)

Error while processing the message.

ActionId (string)

Number of Lynn's action that executed the request. It's -1 if the request has been executed by a channel.

Payload (string)

Payload sent by Lynn.

Reponse (string)

Response from the queried service.

Origin (string)

Origin from where the message was sent.

401 Unauthorized No Response.

Execute Outbound Health Summary Report

Displays a detailed summary of the status of outgoing requests from Lynn to the channels. These requests will be organized into groups based on the channel, service identifier, and obtained response code.

Key Points:

  • Protected Method: No, direct querying is allowed.

Route:

/api/LynnReporting/ExecuteReport/2793/7B9D4B85-0176-428B-BFED-9618940D473A

Postman Example:

Method: POST

Parameter Table:

Parameter Location Description
BODY

{

"startDate": "2023-08-10 16:51:14",

"endDate": "2023-08-14 18:00:35",

"size": 10000,

"lastDocument": " "

}

startDate (Required) Start date of the query.

endDate (Required) End date of the query.

size Number of requested records.

lastDocument Id to query the next page.

Response

HTTP Code Description Response Body
200 Success

isValid (boolean)

Request validation, True if the body is valid.

executionTime (ms)

Time taken to perform the query.

idReport (string)

Guid of the queried report.

nameVisualization (string)

Report name.

totalDocument (int)

Total documents found.

pageCount (Disabled for this report).

lastDocument (string)

Identifier id to query the next page.

Id (string)

Guid identifying Lynn's session.

ReponseCode (int)

Response code for the message processed by Lynn's connector.

Channel (int)

Communication channel identifier.

Service (int)

Lynn's service number.

Count (string)

Total requests with the indicated ResponseCode.

AvegareReponseTime (double - milliseconds)

Average time for the total requests, taken by Lynn's connector to process the message for the total messages.

401 Unauthorized No Response.