Querying Push Information for One Task

Last updated: 2020-09-16 14:36:16

    API Description

    Request method: POST.
    Calling frequency limit: 200 times/hour.

    The API request address corresponds to the service access point one by one; therefore, please select the request address corresponding to your application service access point.

    Service access point in Guangzhou:

    https://api.tpns.tencent.com/v3/statistics/get_push_record

    Service access point in Hong Kong (China):

    https://api.tpns.hk.tencent.com/v3/statistics/get_push_record

    Service access point in Singapore:

    https://api.tpns.sgp.tencent.com/v3/statistics/get_push_record

    Service access point in Shanghai:

    https://api.tpns.sh.tencent.com/v3/statistics/get_push_record

    Feature: this API is used to query the basic information and settings of a task by using its pushid.

    Parameter Description

    Request parameters

    Parameter Name Required Type Description
    pushId Yes String Push task ID. Only the push task for the last one month can be queried.

    Response parameters

    Parameter Name Type Description
    retCode Integer Returned status code
    errMsg String Error message
    pushRecordData Array Returned result, with pushRecordData structure variables shown in following table

    pushRecordData

    Parameter Name Type Description Value Description
    date String Push time Format: YYYY-MM-DD hh:mm:ss
    pushId String Message ID -
    title String Push title -
    content String Push content -
    status String Push status
  • PUSH_INIT //Task created
  • PUSH_WAIT// Waiting for task to be scheduled
  • PUSH_STARTED// Push started
  • PUSH_FINISHED// Push finished
  • PUSH_FAILED// Push failed
  • PUSH_CANCELED// Push canceled by user
  • PUSH_DELETED// Push deleted
  • PUSH_REVOKED// Push revoked
  • PUSH_COLLAPSED// Push overwritten
  • PUSH_DELETED_PUSH_MSG// Push terminated
  • pushType String Push target
  • all // Full push
  • tag // Tag push
  • token_list // Device list
  • account_list // Account list
  • package_account_push // Number package push
  • messageType String Push type
  • notification //Notification
  • message //Message
  • environment String Push environment
  • product //Production environment
  • dev //Development environment
  • expireTime Integer Expiration time Unit: second
    xgMediaResources String Rich media information -
    multiPkg Boolean Whether it is multi-package name push
  • true // Enable multi-package name push
  • false // Disable multi-package name push
  • targetList Array(String) Push account or push device list Valid if pushType is token_list or account_list
    collapseID Integer Message overwriting ID Valid if pushType is all, tag, or package_account_push
    tagSet Object Tag settings Valid if pushType is tag
    Data structure:
    {
    "op":"OR", // Inter-tag logic operation
    "tagWithType":[
    { "tagTypeName":"xg_user_define", // Tag type
    "tagValue":"test68" //Tag value}
    ]
    }
    uploadId Integer Number package ID Valid if pushType is package_account_push
    pushConfig Object Push configuration information
    "Android": for specific push configuration information related to Android, please see the following code
    "iOS": for specific push configuration related to iOS, please see the following code

    Configuration Information

    Android push configuration information

    "android": {
            "ring": 1, // Ring     
            "vibrate": 1,// Vibrate
            "lights": 1,// LED indicator
            "clearable": 1, // Whether dismissible or not     
            "action": {
                "action_type": 3,// Action type; 1. open activity or application; 2. open browser; 3. open Intent         
                "intent": "" // The SDK version must be 1.0.9 or higher. Configure the data tag in the client's intent and set the scheme attribute
            },
          "custom_content":"{}"
        }
        ```
    #### iOS push configuration information
    
    ```json
    "ios":{
            "aps": {
                "alert": {
                    "subtitle": "my subtitle"
                },
                "badge_type": 5, // Badge number displayed by application (optional). -2: auto-increment, -1: unchanged,
                "category": "INVITE_CATEGORY",
                "sound":"default",// If this parameter is left empty, the default sound effect will be used
                "mutable-content":1
            },

    Samples

    Sample request

    {
        "pushId": "133703"
    }

    Sample response

    {
        "retCode": 0,
        "errMsg": "NO_ERROR",
        "pushRecordData": [
            {
                "date": "2019-07-25 20:06:28",
                "pushId": 133703,
                "title": "1",
                "content": "2",
                "status": "PUSH_FINISHED",
                "pushType": "tag",
                "targetList": null,
                "tagSet": {
                    "op": "OR",
                    "tagWithType": [
                        {
                            "tagTypeName": "xg_user_define",
                            "tagValue": "test68"
                        }
                    ]
                },
                "uploadId": 0,
                "expireTime": 86400,
                "messageType": "notify",
                "xgMediaResources": "",
                "environment": "product",
                "collapseID": 0,
                "pushConfig": {
                    "android": {
                        "ring": 1,
                        "vibrate": 0,
                        "lights": 1,
                        "clearable": 1,
                        "action": {
                            "action_type": 1
                        },
                        "custom_content": "{}"
                    },
                    "ios": null
                },
                "multiPkg": false
            }
        ]
    }

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help