All Products
Search
Document Center

QueryDataMessage

Last Updated: Jan 15, 2021

QueryDataMessage

Queries update messages in a specified data table of a specified instance.

Description

Queries update messages in a specified data table of a specified instance.

Method

GET

URI

/openapi/instances/{instanceId}/tables/{table}/data-message

Note:

table indicates the name of a table. This parameter can be set to item or user.

Request parameters

Parameter

Type

Required

Description

startTime

Long

Yes

The start time. The value must be accurate to the second.

endTime

Long

Yes

The end time. The value must be accurate to the second.

itemId

String

No

The ID of the item.

itemType

String

No

The type of the item.

userId

String

No

The ID of the user.

userType

String

No

The type of the user.

cmdType

String

No

The type of the command. Valid values: update, delete, and add.

traceId

String

No

sceneId

String

No

bhvType

String

No

The type of behavior. Valid values: expose, click, like, comment, collect, stay, cart, buy, and evaluate.

page

Integer

No

The number of the page to return. Default value: 1.

size

Integer

No

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

Response parameters

Parameter

Type

Description

RequestId

String

The ID of the request.

Result

Map

The result that is returned.

Sample requests

GET /openapi/instances/airec-cn-xxxxx/tables/item/data-message?startTime=xxx&endTime=xxx&itemType=item&itemId=12345

Sample responses

{
  "RequestId": "16B78383-2803-4964-9605-37B30C073B0E",
  "Result": {
    "TotalNum": 20000,
    "ReturnNum":1000,
    "Detail": [
      {
        "UploadTimestamp": "2019-09-09T16:00:00.000Z",
        "Cmd": "update",
        "Content": {
          "ItemId": "0",
          "ItemType": "article",
          "Title": "abc"
          ...
        }
      },
      {
        "UploadTimestamp": "2019-09-09T16:00:00.000Z",
        "Cmd": "add",
           "Content": {
          "ItemId": "0",
          "ItemType": "article",
          "Title": "abc"
          ...
        }
      }
    ]
  }
}