tencent cloud

Feedback

Querying All Push Information in Specific Period

Last updated: 2024-01-17 14:26:44

    API Description

    Request method: POST Calling frequency limit: 200 times/hour.
    request address/v3/statistics/get_push_record
    The API request address is corresponding to the service access point. Select the request address corresponding to the service access point of your application.
    Feature: this API is used to query the basic information and settings of all tasks within a specified time range.

    Parameter Description

    Request parameters

    Parameter Name
    Required
    Type
    Description
    startDate
    Yes
    String
    Query start date,
    Format: YYYY-MM-DD
    Query limit: within the last 1 months
    endDate
    Yes
    String
    Query end date. Format: YYYY-MM-DD
    msgType
    No
    String
    Message type:
    notify: notification
    message: silent message
    pushType
    No
    String
    Push type:
    all: full push
    tag: tag push
    token: device list/device single push
    account: account list/account single push
    offset
    No
    Integer
    Start offset for paginated query
    limit
    No
    Integer
    Number of messages per page for paginated query (maximum value: 200)

    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
    count
    Integer
    Number of eligible records

    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

    "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

    {
    "limit": 50,
    "startDate": "2019-07-01",
    "endDate": "2019-08-01",
    "msgType": "notify",
    "pushType": "all",
    "offset": 0
    }

    Sample response

    {
    "retCode": 0,
    "errMsg": "NO_ERROR",
    "count": 126,
    "pushRecordData": [
    {
    "date": "2019-11-18 11:26:54",
    "pushId": "12",
    "title": "test title",
    "content": "test log",
    "status": "PUSH_FINISHED",
    "pushType": "all",
    "targetList": null,
    "tagSet": null,
    "uploadId": 0,
    "groupId": "",
    "expireTime": 43200,
    "messageType": "notify",
    "xgMediaResources": "",
    "environment": "product",
    "pushConfig": {
    "android": {
    "n_id": 0,
    "builder_id": 0,
    "ring": 1,
    "ring_raw": "",
    "vibrate": 1,
    "lights": 1,
    "clearable": 1,
    "icon_type": 0,
    "icon_res": "",
    "style_id": 0,
    "small_icon": "",
    "action": {
    "action_type": 3,
    "activity": "",
    "aty_attr": null,
    "browser": null,
    "intent": ""
    },
    "custom_content": ""
    },
    "ios": null,
    "iot": null
    },
    "multiPkg": true,
    "source": "api"
    }
    ]
    }
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support