Skip to content
This repository was archived by the owner on Mar 17, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions developer-guides/rest-api/livechat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ Manage Livechat related data:
| `/api/v1/livechat/visitor/:token` | `GET` | Retrieve a visitor data. | [info](visitor/index.html) |
| `/api/v1/livechat/visitors.info` | `GET` | Retrieve a visitor info. | [info](visitor/index.html) |
| `/api/v1/livechat/page.visited` | `POST` | Send visitor navigation history to Rocket.Chat. | [info](visitor/index.html#send-visitor-navigation-history) |
| `/api/v1/livechat/visitors.pagesVisited` | `GET` | Gets the visitor navigation history. | [info](visitor/index.html#get-the-visitor-navigation-history) |
| `/api/v1/livechat/visitors.chatHistory/room/room-id/visitor/visitor-id` | `GET` | Gets the visitor chat history. | [info](visitor/index.html#get-the-visitor-chat-history) |
62 changes: 61 additions & 1 deletion developer-guides/rest-api/livechat/visitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,66 @@ curl http://localhost:3000/api/v1/livechat/visitors.info?visitorId=iNKE8a6k6cjbq
| :------ | :---------- |
| 2.3.0 | Added |

## Get the visitor navigation history

Retrieve the visitor navigation history

| URL | Requires Auth | HTTP Method |
| :--------------------------------------- | :------------ | :---------- |
| `/api/v1/livechat/visitors.pagesVisited` | `yes` | `GET` |

## Query Parameter

| Argument | Example | Required | Description |
| :------- | :------------------ | :------- | :-------------------- |
| `roomId` | `iNKE8a6k6cjbqWhWd` | Required | The room's id. |

## Example Call

```bash
curl http://localhost:3000/api/v1/livechat/visitors.pagesVisited?roomId=iNKE8a6k6cjbqWhWd
```

## Example Result

```json
{
"pages": [
{
"_id": "7sixPtdqiCcfSRrWJ",
"t": "livechat_navigation_history",
"rid": "wBCg9ZgXT7Mvqz5Xu",
"ts": "2019-10-21T19:51:22.298Z",
"msg": "App test - http://localhost:8601/",
"u": {
"_id": "rocket.cat",
"username": "rocket.cat"
},
"groupable": false,
"navigation": {
"page": {
"change": "url",
"title": "Test",
"location": {
"href": "http://localhost:8601/"
}
},
"token": "9vcfr6wb3sllv5t14d9x3"
},
"_hidden": true,
"_updatedAt": "2019-10-21T19:51:22.298Z"
}
],
"success": true
}
```

## Change Log

| Version | Description |
| :------ | :---------- |
| 2.3.0 | Added |

## Get the visitor chat history

Retrieve the visitor chat history. It supports the [Offset, Count, and Sort Query Parameters](../../offset-and-count-and-sort-info/).
Expand Down Expand Up @@ -279,4 +339,4 @@ curl http://localhost:3000/api/v1/livechat/visitors.chatHistory/room/room-id/vis

| Version | Description |
| :------ | :---------- |
| 2.4.0 | Added |
| 2.4.0 | Added |