QueryPushRecords

Updated at:

You can query push records with pagination and basic filtering.

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

mpush:QueryPushRecords

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AppKey

integer

Yes

The AppKey of the application.

333526247

StartTime

string

Yes

The start time for the query. Specify the time in UTC, using the ISO-8601 format YYYY-MM-DDThh:mm:ssZ.

2021-09-15T02:05:24Z

EndTime

string

Yes

The end time for the query. Specify the time in UTC, using the ISO-8601 format YYYY-MM-DDThh:mm:ssZ.

2021-09-29T06:24:58Z

PushType

string

No

The push type. Valid values:

  • MESSAGE: A message.

  • NOTICE: A notification.

  • LIVE_ACTIVITY: A Live Activity.

NOTICE

Target

string

No

The push target. Valid values:

  • DEVICE: Push to devices.

  • ACCOUNT: Push to accounts.

  • ALIAS: Push to aliases.

  • TAG: Push to tags.

  • ALL: Push to all devices.

  • TBD: Initializes a continuous push. The push target is specified in a subsequent call to the ContinuouslyPush API operation.

DEVICE

Source

string

No

The push source. Valid values:

  • API: Pushes initiated via an OpenAPI call.

  • CONSOLE: Pushes initiated from the Mobile Push console.

  • OpenAPIExplorer: Pushes initiated from Alibaba Cloud OpenAPI Explorer.

API

Keyword

string

No

The keyword used for the query. The search covers the MessageId, Title, and Body fields. For Title and Body, the system applies Chinese word segmentation and matches whole tokens instead of substrings.

统计数据测试通知805

NextToken

string

No

This parameter is deprecated.

FFPpkmhCPm*****************xjk=

PageSize

integer

No

The number of entries to return on each page. Default: 20. Maximum: 100.

10

Page

integer

No

The page number to query. Default: 1. Maximum: 10,000.

8

Response elements

Element

Type

Description

Example

object

NextToken

string

Deprecated. This parameter is no longer used.

i91D***********kXIh/dVBEQ==

PageSize

integer

The number of entries per page.

20

RequestId

string

The request ID.

9B24B396-249D-55E4-8CA1-66C9B50BB734

Total

integer

The total number of records.

193

Page

integer

The current page number.

11

PushInfos

object

PushInfo

array<object>

The details of a specific notification or message.

object

Status

string

The status of the message. Valid values:

  • WAITING: The push is waiting to be sent.

  • SENT: The push has been sent.

  • CANCELED: The push has been canceled.

SENT

MessageId

string

The message ID.

510431

AppKey

integer

The AppKey of the application.

333526247

DeviceType

string

The device type. Valid values:

  • ALL: All device types.

  • iOS: iOS devices.

  • Android: Android devices.

Valid values:

  • ALL :

    ALL

  • IOS :

    iOS

  • ANDROID :

    Android

ANDROID

PushType

string

The push type. Valid values:

  • MESSAGE: A message.

  • NOTICE: A notification.

Valid values:

  • MESSAGE :

    MESSAGE

  • NOTICE :

    NOTICE

NOTICE

Body

string

The push body.

abcd

Title

string

The push title.

sssss

Source

string

The source of the push. Valid values:

  • API: A push triggered by an OpenAPI call, including pushes from the OpenAPI console.

  • CONSOLE: A push triggered from the Mobile Push console.

Valid values:

  • CONSOLE :

    CONSOLE

  • API :

    API

DEVICE

PushTime

string

The UTC time when the push was sent, in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ.

2021-09-15T02:05:24Z

Target

string

The push target. Valid values:

  • ACCOUNT: Push to a specified account.

  • ALIAS: Push to a specified alias.

  • DEVICE: Push to a specified device.

  • TAG: Push to a specified tag.

  • ALL: Push to all devices.

  • TBD: Initializes a continuous push. The target is specified later by calling the ContinuouslyPush API operation.

DEVICE

Examples

Success response

JSON format

{
  "NextToken": "i91D***********kXIh/dVBEQ==",
  "PageSize": 20,
  "RequestId": "9B24B396-249D-55E4-8CA1-66C9B50BB734",
  "Total": 193,
  "Page": 11,
  "PushInfos": {
    "PushInfo": [
      {
        "Status": "SENT",
        "MessageId": "510431",
        "AppKey": 333526247,
        "DeviceType": "ANDROID",
        "PushType": "NOTICE",
        "Body": "abcd",
        "Title": "sssss",
        "Source": "DEVICE",
        "PushTime": "2021-09-15T02:05:24Z",
        "Target": "DEVICE"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 AccountDisabled Your account is not enabled.
500 InternalError The request processing has failed due to some unknown error. Please try again. If the error still exists, submit a ticket. The request processing has failed due to some unknown error.
500 Timeout The request processing is timeout. Request processing timed out.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.