Overview

Retrieve system analytics data including traffic, platforms, memory usage, and countries.

Client

Require permission rules masterAdmin.getAnalytics.selfEnable. See PermissionRules

HTTP

POST /api/rJson/masterAdmin/client/getAnalytics

Request Headers
NameRequiredDescription
Auth-TokentrueA token used to authenticate the user. It is issued after successful login from the client type authenticate (e.g., loginByAccount, loginWithCustomId, etc.) or when an admin logs in via the GearN Dashboard. This token identifies the request sender and determines their access level.
Secret-KeytrueThe SecretKey in SecretInfo with role must is Player.
Game-IdOptional if the gameId in the SecretInfo use in headers Secret-Key has assign a valid value, if not, let unique identifier of the game this request is targeting.
Content-Typetrueapplication/json
Request Body
CodeTypeRequiredDescription
timestampnumberUnix timestamp used for filtering analytics or logs. (from 0)
analyticsItembooleanInclude general analytics metrics.
countrybooleanInclude country-based analytics breakdown.
requestCompletebooleanInclude completed request data in analytics.
operationSystembooleanInclude platform or OS-based analytics breakdown.
databaseSystembooleanDatabaseSystem parameter.
logDatabaseSystembooleanLogDatabaseSystem parameter.
costbooleanCost parameter.
monthlyCostbooleanMonthlyCost parameter.
Response Body

200 Ok

CodeTypeRequiredDescription
returnCodeReturnCodetrueAdditional metadata that can be attached to any request. Especially useful when working with advanced features such as EventCallbackScript. See ReturnCode
debugMessagestringA developer-oriented message that provides additional context useful for debugging and internal logging. This field is not intended for end-users and may include stack traces, validation failures, or internal error diagnostics.
invalidRequestParametersInvalidMember[]Just had data when the returnCode is InvalidRequestParameters.A list of members that failed validation or could not be processed during the request. Each entry typically includes identifying information and an error reason. This is useful for partial success scenarios where some members are accepted and others are rejected. See InvalidMember
parametersResponseDataJust had data when the returnCode is Ok. A dynamic set of key-value pairs included in the response to provide additional context or metadata. These parameters may vary depending on the operation and typically contain optional fields such as timestamps, identifiers, or computed values relevant to the result. See ResponseData
ReturnCode
NameCodeDescription
SecretInvalid-10Secret token is invalid (removed, expired or does not contains).
MaxSizeRequestReject-9Request rejected due to exceeding maximum allowed size.
MaxRequestReject-8Request rejected because the number of requests has exceeded the allowed limit per user or IP or exceeds the total number of pending requests the server is waiting to process..
MaxCCUReject-7Connection rejected due to exceeding the allowed CCU (Concurrent Users).
OperationNotAuthorized-6You are not authorized to perform this operation. Possibly due to missing or invalid token, or insufficient permissions.
InvalidRequestParameters-5Request parameters are invalid or missing.
OperationInvalid-4The requested operation is invalid or not supported.
InternalServerError-3Internal server error. Could be due to an unhandled exception or logic failure.
OperationNotAllow-2This operation is not allowed in the current context.
OperationTimeout-1The operation timed out. No response received within the expected time.
UnknownError0An unknown error occurred. The cause could not be determined.
Ok1Success. The operation completed successfully and returned a valid result.
ResponseData
CodeTypeRequiredDescription
errorCodeErrorCodeA string that represents the status of the operation. It indicates whether the request was successful or failed due to a specific error condition. See ErrorCode
analyticsItemAnalyticsItemResponseDataAnalyticsItem used in GetAnalyticsResponseData. See AnalyticsItemResponseData
countryCountryResponseData[]Country used in GetAnalyticsResponseData. See CountryResponseData
operationSystemOperationSystemResponseDataOperationSystem used in GetAnalyticsResponseData. See OperationSystemResponseData
requestCompleteRequestCompleteResponseData[]RequestComplete used in GetAnalyticsResponseData. See RequestCompleteResponseData
databaseSystemDatabaseSystemResponseDataDatabaseSystem used in GetAnalyticsResponseData. See DatabaseSystemResponseData
logDatabaseSystemDatabaseSystemResponseDataLogDatabaseSystem used in GetAnalyticsResponseData. See DatabaseSystemResponseData
costCostResponseDataCost used in GetAnalyticsResponseData. See CostResponseData
monthlyCostCostResponseDataMonthlyCost used in GetAnalyticsResponseData. See CostResponseData
AnalyticsItemResponseData

Represents the data returned from an API call.

CodeTypeRequiredDescription
cCUnumbertrueCCU used in AnalyticsItemResponseData.
dAUnumbertrueDAU used in AnalyticsItemResponseData.
dAUSince0hnumbertrueDAUSince0h used in AnalyticsItemResponseData.
dNUnumbertrueDNU used in AnalyticsItemResponseData.
dNUSince0hnumbertrueDNUSince0h used in AnalyticsItemResponseData.
dRTnumbertrueDRT used in AnalyticsItemResponseData.
dRTSince0hnumbertrueDRTSince0h used in AnalyticsItemResponseData.
mAUnumbertrueMAU used in AnalyticsItemResponseData.
mAUSince0h1numbertrueMAUSince0h1 used in AnalyticsItemResponseData.
mNUnumbertrueMNU used in AnalyticsItemResponseData.
mNUSince0h1numbertrueMNUSince0h1 used in AnalyticsItemResponseData.
mRTnumbertrueMRT used in AnalyticsItemResponseData.
mRTSince0h1numbertrueMRTSince0h1 used in AnalyticsItemResponseData.
analyticsPricenumbertrueAnalyticsPrice used in AnalyticsItemResponseData.
CountryResponseData

Represents the data returned from an API call.

CodeTypeRequiredDescription
countryCodestringtrueCountryCode used in CountryResponseData.
regionsCountryRegionResponseData[]trueRegions used in CountryResponseData. See CountryRegionResponseData
CountryRegionResponseData

Represents the data returned from an API call.

CodeTypeRequiredDescription
regionCodestringtrueRegionCode used in CountryRegionResponseData.
regionNamestringtrueRegionName used in CountryRegionResponseData.
cCUnumbertrueCCU used in CountryRegionResponseData.
latitudenumberLatitude used in CountryRegionResponseData. (Default: 0)
longitudenumberLongitude used in CountryRegionResponseData. (Default: 0)
OperationSystemResponseData

Represents the data returned from an API call.

CodeTypeRequiredDescription
cpuUsagenumbertrueCpuUsage used in OperationSystemResponseData.
memoryUsageMemoryUsageResponseDatatrueMemoryUsage used in OperationSystemResponseData. See MemoryUsageResponseData
storageUsageStorageUsageResponseData[]trueStorageUsage used in OperationSystemResponseData. See StorageUsageResponseData
MemoryUsageResponseData

Represents the data returned from an API call.

CodeTypeRequiredDescription
freeMemoryInBytesnumbertrueFreeMemoryInBytes used in MemoryUsageResponseData.
totalMemoryInBytesnumbertrueTotalMemoryInBytes used in MemoryUsageResponseData.
StorageUsageResponseData

Represents the data returned from an API call.

CodeTypeRequiredDescription
namestringtrueName used in StorageUsageResponseData.
fsTotalSizeInBytesnumbertrueFsTotalSizeInBytes used in StorageUsageResponseData.
fsUsedSizeInBytesnumbertrueFsUsedSizeInBytes used in StorageUsageResponseData.
RequestCompleteResponseData

Represents the data returned from an API call.

CodeTypeRequiredDescription
eventNamestringtrueEventName used in RequestCompleteResponseData.
resultsRequestCompleteErrorCodeResponseData[]trueResults used in RequestCompleteResponseData. See RequestCompleteErrorCodeResponseData
RequestCompleteErrorCodeResponseData

Represents the data returned from an API call.

CodeTypeRequiredDescription
errorCodenumbertrueErrorCode used in RequestCompleteErrorCodeResponseData.
countnumbertrueThe number of entries.
DatabaseSystemResponseData

Represents the data returned from an API call.

CodeTypeRequiredDescription
fsTotalSizeInBytesnumbertrueFsTotalSizeInBytes used in DatabaseSystemResponseData.
fsUsedSizeInBytesnumbertrueFsUsedSizeInBytes used in DatabaseSystemResponseData.
totalSizeInBytesnumbertrueTotalSizeInBytes used in DatabaseSystemResponseData.
collectionsnumbertrueCollections used in DatabaseSystemResponseData.
objectsnumbertrueObjects used in DatabaseSystemResponseData.
indexesnumbertrueIndexes used in DatabaseSystemResponseData.
CostResponseData

Represents the data returned from an API call.

CodeTypeRequiredDescription
requestCountnumbertrueThe number of request entries.
matchmakingRequestCountnumbertrueThe number of matchmakingrequest entries.
cloudScriptGBsnumbertrueCloudScriptGBs used in CostResponseData.
storageSizeInBytesnumbertrueStorageSizeInBytes used in CostResponseData.
dataTransferSizeInBytesnumbertrueDataTransferSizeInBytes used in CostResponseData.
ErrorCode
NameCode
Ok1
ItemNotFound10
InvalidMember
CodeTypeDescription
codestringThe parameterCode invalid.
invalidMemberTypeInvalidMemberTypeThe invalid member type of this parameterCode. See InvalidMemberType
InvalidMemberType
NameCodeDescription
UnknownError1An unspecified or unexpected error has occurred.
DataRequired2A required data field is missing or not provided.
TypeInvalid3The data type provided does not match the expected type.
StringNull4A string value is null or has not been assigned.
StringMinLength5The string value is shorter than the minimum required length.
StringMaxLength6The string value exceeds the maximum allowed length.
NumberMinValue7The numeric value is less than the minimum allowed value.
NumberMaxValue8The numeric value exceeds the maximum allowed value.
NumberMustInt9The numeric value must be an integer but is not.
GNHashtableNull10The hashtable object is null or not provided.
GNHashtableMinLength11The hashtable contains fewer entries than the minimum required.
GNHashtableMaxLength12The hashtable contains more entries than the maximum allowed.
GNArrayNull13The array object is null or not provided.
GNArrayMinLength14The array contains fewer elements than the minimum required.
GNArrayMaxLength15The array contains more elements than the maximum allowed.