QuerySessionData

Updated at:

Queries the session count trend at various time points on a specified date, returned in 10-minute intervals.

Operation description

Call this operation to query the session count trend data for the current Alibaba Cloud account on a specified date. The data consists of offline statistical results organized by day and returns the session counts at various time points on that date.

The returned results are aggregated in 10-minute intervals. Each data point is identified by an hour (Hh, values 00-23) and a minute (Mi, values 00, 10, 20, 30, 40, 50) representing a time point, and SessionCntMi is the aggregated session count within the 10-minute interval for that time point. The results are sorted in ascending order by hour and minute.

You can specify a business region by using BizRegionId and filter by delivery group by using AppInstanceGroupId. If neither parameter is provided, the aggregated session data for all regions and all delivery groups under the current account is returned. The actual region used to filter session data is determined by BizRegionId.

StatDate is the statistical date in the yyyyMMdd format. If this parameter is not provided, the data for yesterday is queried by default. Only dates within the last 90 days are supported. If there is no session data on the specified date, an empty list is returned and the return code is NO_DATA.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

appstreaming:QuerySessionData

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID, which is a common request parameter for the gateway. The actual region used to filter session data in this operation is specified by BizRegionId.

cn-hangzhou

AppInstanceGroupId

string

No

The delivery group ID, used to filter session data for a specified delivery group. If not provided, the aggregated session data for all delivery groups under the current account is returned.

aig-89ibriac2wudyph38

StatDate

string

No

The statistical date in the yyyyMMdd format (without hyphens), such as 20261106. If not provided, the data for yesterday is queried by default. Only dates within the last 90 days are supported. If the date exceeds 90 days or the format is invalid, a parameter error is returned.

20261106

BizRegionId

string

No

The business region ID, which specifies the region for which to query session data. The server uses this value as the region filter condition for session data. If not provided, no region filtering is applied and the aggregated session data for all regions is returned.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

The response for querying session trend data, which includes the request ID, return code, return message, and session trend data list.

RequestId

string

The ID of the request, used to locate call records and troubleshoot issues. The example shows a partially desensitized value.

D4A13D91-****

Code

string

The return code. It is empty when the request is successful and data is found. NO_DATA is returned when the query result is empty. If the request fails, the corresponding error code is returned, such as InvalidParameter.DateFormat when the format of the statistical parameter is invalid.

NO_DATA

Message

string

The return message. It is empty when the request is successful. If the request fails, the corresponding error description is returned.

The parameter DateFormat is invalid.

IndexData

array<object>

The list of session trend data, sorted in ascending order by hour and minute. An empty array is returned when there is no session data on the specified date, and the return code is NO_DATA.

object

StatDate

string

The statistical date to which the session data belongs, in the yyyyMMdd format, consistent with the request parameter StatDate.

20261106

Hh

string

The hour to which the session data belongs, with a value range of 00-23 (full hours).

10

Mi

string

The minute to which the session data belongs, aggregated in 10-minute intervals, with a value range of 00-50 (namely 00, 10, 20, 30, 40, and 50).

30

SessionCntMi

integer

The aggregated session count within the hour and minute interval (10-minute granularity).

128

Examples

Success response

JSON format

{
  "RequestId": "D4A13D91-****",
  "Code": "NO_DATA",
  "Message": "The parameter DateFormat is invalid.",
  "IndexData": [
    {
      "StatDate": "20261106",
      "Hh": "10",
      "Mi": "30",
      "SessionCntMi": 128
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.