All Products
Search
Document Center

Mobile Platform as a Service:Usage analysis

Last Updated:Feb 11, 2026

Query statistics

You can query statistics for message pushes, including the total pushes, successful pushes, arrivals, message opens, and message ignores.

Request parameters

Parameter Name

Type

Required

Example

Description

appId

String

Yes

ONEX570DA89211721

The mPaaS App ID.

workspaceId

String

Yes

test

The mPaaS workspace.

startTime

long

Yes

1619798400000

The start timestamp of the time range to query. This is a UNIX timestamp in milliseconds, accurate to the day.

endTime

long

Yes

1624358433000

The end timestamp of the time range to query. This is a UNIX timestamp in milliseconds, accurate to the day. The interval between the start time and end time cannot exceed 90 days.

platform

String

No

ANDROID

The platform. If you do not specify this parameter, data for all platforms is returned. Valid values: iOS and Android.

channel

String

No

ANDROID

The push channel to query. If a channel is not specified, all channels are queried. Valid values: IOS, FCM, HMS, MIUI, OPPO, VIVO, and ANDROID (self-built channel).

type

String

No

SIMPLE

The push type. If you do not specify this parameter, data for all types is queried. Valid values: SIMPLE, TEMPLATE, MULTIPLE, and BROADCAST.

taskId

String

No

20842863

The push task ID.

Response parameters

Parameter name

Type

Example

Description

RequestId

String

B589F4F4-CD68-3CE5-BDA0-6597F33E23916512

The request ID.

ResultCode

String

OK

The result code of the request.

ResultMessage

String

param is invalid

The description of the error.

ResultContent

JSON

-

The response content.

data

JSON

-

The response content. The value of this parameter is included in the ResultContent JSON string.

pushTotalNum

float

100

The total number of pushes.

pushNum

float

100

The number of successful pushes.

arrivalNum

float

100

The number of delivered pushes.

openNum

float

100

The number of opened pushes.

openRate

float

100

The push open rate.

ignoreNum

float

100

The number of ignored pushes.

ignoreRate

float

100

The push ignore rate.

Example

import com.alibaba.fastjson.JSON;
import com.aliyun.mpaas20201028.Client;
import com.aliyun.mpaas20201028.models.QueryPushAnalysisCoreIndexRequest;
import com.aliyun.mpaas20201028.models.QueryPushAnalysisCoreIndexResponse;
import com.aliyun.teaopenapi.models.Config;

public static void main(String[] args) throws Exception {
    // An Alibaba Cloud account AccessKey has full access permissions for all APIs. We recommend that you use a Resource Access Management (RAM) user for API calls and daily O&M.
    // We strongly recommend that you do not hard-code the AccessKey ID and AccessKey secret in your project code. Otherwise, the AccessKey pair may be leaked and threaten the security of all the resources in your account.
    // This example shows how to store the AccessKey ID and AccessKey secret in environment variables. You can also store them in a configuration file as needed.
    // We recommend that you configure the environment variables first.
    Config config = new Config();
    // Required. Your AccessKey ID.
    config.setAccessKeyId(System.getenv("MPAAS_AK_ENV"));
    // Required. Your AccessKey secret.
    config.setAccessKeySecret(System.getenv("MPAAS_SK_ENV"));
    // The REGION_ID and Endpoint of mPaaS. The following example uses the Hangzhou region.
    config.setRegionId("cn-hangzhou");
    config.setEndpoint("mpaas.cn-hangzhou.aliyuncs.com");
    Client client = new Client(config);

    QueryPushAnalysisCoreIndexRequest request = new QueryPushAnalysisCoreIndexRequest();
    request.setAppId("ONEX570DA89211721");
    request.setWorkspaceId("test");
    request.setTenantId("xxx");
    request.setStartTime(Long.valueOf("1764864000000"));
    request.setEndTime(Long.valueOf("1764950219999"));
    request.setPlatform("ANDROID");
    request.setChannel("ANDROID");
    request.setType("SIMPLE");
    QueryPushAnalysisCoreIndexResponse queryPushAnalysisCoreIndexResponse = client.queryPushAnalysisCoreIndex(request);
    System.out.println("response==>"+JSON.toJSONString(queryPushAnalysisCoreIndexResponse));
}

Query the push task list

You can query information about batch push tasks and broadcast push tasks that are created in the console or triggered by API calls.

Request parameters

Parameter Name

Type

Required

Description

Description

appId

String

Yes

ONEX570DA89211721

The mPaaS App ID.

workspaceId

String

Yes

test

The mPaaS workspace.

startTime

long

Yes

1619798400000

The start timestamp. This is a UNIX timestamp in milliseconds, accurate to the day.

taskId

String

No

20842863

The push task ID.

taskName

String

No

Test Task

The name of the push task.

pageNumber

int

No

1

The page number. Default value: 1.

pageSize

int

No

10

The number of entries per page. Default value: 500.

Response parameters

Parameter Name

Type

Example

Description

RequestId

String

B589F4F4-CD68-3CE5-BDA0-6597F33E23916512

The request ID.

ResultCode

String

OK

The result code of the request.

ResultMessage

String

param is invalid

The description of the error.

ResultContent

JSON

The response content.

data

JSONArray

The response content. The value of this parameter is included in the ResultContent JSON string.

taskId

String

20927873

The task ID.

taskName

String

Test Task

The task name.

templateId

String

9108

The template ID.

templateName

String

Test Template

The template name.

type

long

3

The push type. Valid values:

  • 2: Batch push

  • 3: Broadcast push

gmtCreate

long

1630052750000

The creation time.

Example

import com.alibaba.fastjson.JSON;
import com.aliyun.mpaas20201028.Client;
import com.aliyun.mpaas20201028.models.QueryPushAnalysisTaskListRequest;
import com.aliyun.mpaas20201028.models.QueryPushAnalysisTaskListResponse;
import com.aliyun.teaopenapi.models.Config;

public static void main(String[] args) throws Exception {
    // An Alibaba Cloud account AccessKey has full access permissions for all APIs. We recommend that you use a Resource Access Management (RAM) user for API calls and daily O&M.
    // We strongly recommend that you do not hard-code the AccessKey ID and AccessKey secret in your project code. Otherwise, the AccessKey pair may be leaked and threaten the security of all the resources in your account.
    // This example shows how to store the AccessKey ID and AccessKey secret in environment variables. You can also store them in a configuration file as needed.
    // We recommend that you configure the environment variables first.
    Config config = new Config();
    // Required. Your AccessKey ID.
    config.setAccessKeyId(System.getenv("MPAAS_AK_ENV"));
    // Required. Your AccessKey secret.
    config.setAccessKeySecret(System.getenv("MPAAS_SK_ENV"));
    // The REGION_ID and Endpoint of mPaaS. The following example uses the Hangzhou region.
    config.setRegionId("cn-hangzhou");
    config.setEndpoint("mpaas.cn-hangzhou.aliyuncs.com");
    Client client = new Client(config);

    QueryPushAnalysisTaskListRequest request = new QueryPushAnalysisTaskListRequest();
    request.setAppId("ONEX570DA89211721");
    request.setWorkspaceId("test");
    request.setTenantId("xxx");
    request.setStartTime(Long.valueOf("1617206400000"));
    request.setTaskId("20845212");
    request.setTaskName("Test Task");
    request.setPageNumber(1);
    request.setPageSize(10);
    QueryPushAnalysisTaskListResponse queryPushAnalysisTaskListResponse = client.queryPushAnalysisTaskList(request);
    System.out.println("response==>"+JSON.toJSONString(queryPushAnalysisTaskListResponse));
}

Query push task details

You can query the details of batch push tasks and broadcast push tasks that are created in the console or triggered by API calls.

Request parameters

Parameter Name

Type

Required

Example

Description

appId

String

Yes

ONEX570DA89211721

The mPaaS App ID.

workspaceId

String

Yes

test

The mPaaS workspace.

taskId

String

Yes

20842863

The push task ID.

Response parameters

Parameter Name

Type

Example

Description

RequestId

String

B589F4F4-CD68-3CE5-BDA0-6597F33E23916512

The request ID.

ResultCode

String

OK

The result code of the request.

ResultMessage

String

param is invalid

The description of the error.

ResultContent

JSON

The response content.

data

JSON

The response content. The value of this parameter is included in the ResultContent JSON string.

taskId

long

20927872

The task ID.

pushNum

float

10

The number of pushes.

pushSuccessNum

float

10

The number of successful pushes.

pushArrivalNum

float

10

The number of delivered pushes.

startTime

long

1630052735000

The start time in milliseconds.

endTime

long

1630052831000

The end time in milliseconds.

duration

string

00 hours 01 minute 36 seconds

The duration.

Example

import com.alibaba.fastjson.JSON;
import com.aliyun.mpaas20201028.Client;
import com.aliyun.mpaas20201028.models.QueryPushAnalysisTaskDetailRequest;
import com.aliyun.mpaas20201028.models.QueryPushAnalysisTaskDetailResponse;
import com.aliyun.teaopenapi.models.Config;

public static void main(String[] args) throws Exception {
    // An Alibaba Cloud account AccessKey has full access permissions for all APIs. We recommend that you use a Resource Access Management (RAM) user for API calls and daily O&M.
    // We strongly recommend that you do not hard-code the AccessKey ID and AccessKey secret in your project code. Otherwise, the AccessKey pair may be leaked and threaten the security of all the resources in your account.
    // This example shows how to store the AccessKey ID and AccessKey secret in environment variables. You can also store them in a configuration file as needed.
    // We recommend that you configure the environment variables first.
    Config config = new Config();
    // Required. Your AccessKey ID.
    config.setAccessKeyId(System.getenv("MPAAS_AK_ENV"));
    // Required. Your AccessKey secret.
    config.setAccessKeySecret(System.getenv("MPAAS_SK_ENV"));
    // The REGION_ID and Endpoint of mPaaS. The following example uses the Hangzhou region.
    config.setRegionId("cn-hangzhou");
    config.setEndpoint("mpaas.cn-hangzhou.aliyuncs.com");
    Client client = new Client(config);

    QueryPushAnalysisTaskDetailRequest request = new QueryPushAnalysisTaskDetailRequest();
    request.setAppId("ONEX570DA89211721");
    request.setWorkspaceId("test");
    request.setTenantId("xxx");
    request.setTaskId("21589533");
    QueryPushAnalysisTaskDetailResponse queryPushAnalysisTaskDetailResponse = client.queryPushAnalysisTaskDetail(request);
    System.out.println("response==>"+JSON.toJSONString(queryPushAnalysisTaskDetailResponse));
}