Skip to main content
Version: 25.03

Performance Monitoring - User Samples Read

Enterprise

This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.

Endpoint​

/o/apm/user-samples

Overview​

Returns a page of the performance monitoring samples recorded for one user.

Authentication​

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions​

Requires performance_monitoring Read permission.

Request Parameters​

ParameterTypeRequiredDescription
app_idStringYesApplication ID.
uidStringYesUser ID (uid) of the app user.
typeStringYesTrace type: network or device.
sSearchStringNoOnly samples whose trace name matches this text (case-insensitive) are returned.
iDisplayStartNumberNoNumber of samples to skip. Default is 0.
iDisplayLengthNumberNoNumber of samples to return. Default is 5.
iSortCol_0NumberNoIndex of the column to sort by: 1 trace name, 2 start time, 3 end time. Default is 2.
sSortDir_0StringNoasc for ascending order; any other value sorts in descending order.
sEchoStringNoCounter that is returned unchanged in the response.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Examples​

Read samples of a user​

/o/apm/user-samples?
app_id=6991c75b024cb89cdc04efd2&
api_key=YOUR_API_KEY&
uid=a1b2c3d4&
type=network

Response​

Success Response​

{
"sEcho": "1",
"iTotalRecords": 12,
"iTotalDisplayRecords": 12,
"aaData": []
}

Response Fields​

FieldTypeDescription
sEchoStringThe sEcho value of the request.
iTotalRecordsNumberTotal number of samples of the user.
iTotalDisplayRecordsNumberSame value as iTotalRecords.
aaDataArrayThe samples of the requested page. Each sample has the sample _id, did, uid, ts and sg with the trace name, apm_metrics, stz and etz.

Error Responses​

  • 400
{
"result": "Please provide user uid."
}
  • 400
{
"result": "Please provide APM type."
}
  • 400
{
"result": "Something went wrong."
}