Retrieving slowest database queries

The API contains the following sections:

API overview

Method—GET

Request parameters—timestamp, application, dbId, limit

API registration

Use the following URL to register the API:

https://portalHost:portalPort/portal/rest/db/top-slowest

Replace the following entries, as required:

EntryDescription
httpsProtocol used to send the request
portalHostHost name or IP address of the App Visibility portal
portalPort

Communication port number of the App Visibility portal.

The default port number is 8100.

Request parameters

EntryDescriptionMandatory
timestamp

Epoch time stamp of the problem, in milliseconds, from which to start the data collection

Use a time stamp converter, such as http://www.epochconverter.com/, to generate the value.

Yes
application

Identifying string (automatically assigned) of the application

Example: applicationId=appID1

Yes
dbId

Identifying string (automatically assigned) of the database

Example: dbId=dbID1

Yes
limitMaximum number of queries to returnYes

URL example

https://my-portal-33:8100/portal/rest/db/top-slowest?timestamp=1441692600000&application=appId1&dbId=dbID1&limit=10

Sample JSON response

[
	{
		"db": " dbID1",
		"query": "Insert@testdb.users",
		"minLatency": 100,
		"maxLatency": 5000,
		"avgLatency": 300,
		"count": 2,
		"latencyViolationCount": 0
	}
]

Response content

The response shows data about impacted database queries since the specified time.

ObjectDescription
dbIdentifying string (automatically assigned) of the database
queryDatabase query name
minLatencyTime, in milliseconds, of the fastest query since the specified time
maxLatencyTime, in milliseconds, of the slowest query since the specified time
avgLatencyAverage time, in milliseconds, of queries since the specified time
count

Number of queries since the specified time

latencyViolationCount

Number of queries with latency violations

Related topics

Using APIs to generate report data for App Visibility Manager

Analyzing database problems with the Database tier

Was this page helpful? Yes No Submitting... Thank you

Comments