事件

如何拉取特定录制的所有事件。

事件

返回特定会话录制中包含的事件列表,例如点击、页面访问或输入。这些是高级(已建立索引的)事件,可以在 OpenReplay 应用中进行搜索。

GET

/api/v1/:projectKey/sessions/:sessionId/events

名称类型说明
projectKeystring你正在跟踪的项目的 ID(必填)
sessionIdstring你正在从中拉取事件的会话的 ID(必填)

Authorization: {YOUR_ORGANIZATION_API_KEY}:该密钥可在 ‘Preferences’ > ‘Account’ > ‘Organization API Key’ 中找到。

200:响应以 JSON 形式在正文中发送

curl -X GET \
  https://openreplay.example.com/api/v1/3sWXSsqHgSKnE87YkNJK/sessions/4813023023591169/events \
  -H 'content-type: application/json' \
  -H 'Authorization: {YOUR_ORGANIZATION_API_KEY}'
{
    "data": [{
        "sessionId": 4813023023591169,
        "messageId": 4294969053,
        "timestamp": 1623440905732,
        "host": "testsite.openreplay.com",
        "path": "/my-account/",
        "basePath": "/my-account/",
        "referrer": "https://testsite.openreplay.com/",
        "baseReferrer": "https://testsite.openreplay.com/",
        "domBuildingTime": null,
        "domContentLoadedTime": null,
        "loadTime": null,
        "firstPaintTime": null,
        "firstContentfulPaintTime": null,
        "speedIndex": null,
        "visuallyComplete": null,
        "timeToInteractive": null,
        "responseTime": null,
        "responseEnd": null,
        "ttfb": null,
        "value": "/my-account/",
        "url": "/my-account/",
        "type": "LOCATION"
    }, {
        "sessionId": 4813023023591169,
        "messageId": 17179871001,
        "timestamp": 1623440915126,
        "label": "Shop",
        "type": "CLICK"
    }, {
        "sessionId": 4813023023591169,
        "messageId": 25769806952,
        "timestamp": 1623440919928,
        "host": "testsite.openreplay.com",
        "path": "/product/beanie-with-logo/",
        "basePath": "/product/beanie-with-logo/",
        "referrer": "https://testsite.openreplay.com/shop/",
        "baseReferrer": "https://testsite.openreplay.com/shop/",
        "domBuildingTime": null,
        "domContentLoadedTime": null,
        "loadTime": null,
        "firstPaintTime": null,
        "firstContentfulPaintTime": null,
        "speedIndex": null,
        "visuallyComplete": null,
        "timeToInteractive": null,
        "responseTime": null,
        "responseEnd": null,
        "ttfb": null,
        "value": "/product/beanie-with-logo/",
        "url": "/product/beanie-with-logo/",
        "type": "LOCATION"
    }]
}