Skip to content

add GetGroups and SearchMessage doc (#269) #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
117 changes: 117 additions & 0 deletions docs/restapi/apis/groupManagement/getGroups.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
sidebar_position: 22
title: 获取群列表
hide_title: true
---

<center>

## 获取群列表

</center>

### 简要描述
- 按指定条件搜索群列表.

### 请求方式
- `post`

### 请求URL
- `{API_ADDRESS}/group/get_groups`

### Header
|header名|示例值|选填|类型|说明|
|:---- |:------- |:--- |---|------ |
|operationID|1646445464564|必填|string|用于全局链路追踪,建议使用时间戳,在每个请求中独立|
|token|eyJhbxxxx3Xs|必填|string|[管理员 token](docs/restapi/apis/authenticationManagement/getAdminToken.mdx)|

### 请求参数示例

```json
{
"groupName": "Test",
"groupID": "464588223",
"pagination": {
"pageNumber": 1,
"showNumber": 200
}
}
```

| 字段名 | 选填 | 类型 | 说明 |
|:---------------------|:-------|:--------|:-------------------|
| groupID | 选填 | string | 群ID |
| groupName | 选填 | string | 群名称 |
| pagination | 必填 | object | 分页参数结构体 |
| pagination.pageNumber | 必填 | int | 当前页码,从1开始 |
| pagination.showNumber | 必填 | int | 当前页请求数量 |

### 成功返回示例

```json
{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": {
"total": 1,
"groups": [
{
"groupInfo": {
"groupID": "464588223",
"groupName": "Test Group Project",
"notification": "",
"introduction": "This is test group",
"faceURL": "",
"ownerUserID": "019825",
"createTime": 1741355328901,
"memberCount": 24,
"ex": "",
"status": 0,
"creatorUserID": "019825",
"groupType": 2,
"needVerification": 0,
"lookMemberInfo": 0,
"applyMemberFriend": 0,
"notificationUpdateTime": 0,
"notificationUserID": ""
},
"groupOwnerUserName": "",
"groupOwnerUserID": "019825"
}
]
}
}
```

### 成功返回示例的参数说明

| 参数名 | 类型 | 说明 |
|:----------------------|:---------|:----------------------------------------------|
| errCode | int | 错误码,0表示成功 |
| errMsg | string | 错误简要信息,为空 |
| errDlt | errDlt | 错误详细信息,为空 |
| data | object | 通用数据对象,具体结构见下方 |
| total | int | 群总数 |
| groups | array | 群列表 |
| groups.groupInfo | object | [群信息对象](docs/restapi/commonFields#groupinfo) |
| groups.groupOwnerUserName | string | 群主名称 |
| groups.groupOwnerUserID | string | 群主ID |

### 失败返回示例

```json
{
"errCode": 1004,
"errMsg": "RecordNotFoundError",
"errDlt": ": [1004]RecordNotFoundError"
}
```

### 失败返回示例的参数说明

| 参数名 | 类型 | 说明 |
|:---------------------|:---------|:----------------------------------------|
| errCode | int | 错误码,具体查看全局错误码文档 |
| errMsg | string | 错误简要信息 |
| errDlt | errDlt | 错误详细信息 |
155 changes: 155 additions & 0 deletions docs/restapi/apis/messageManagement/searchMessage.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
sidebar_position: 6
title: 搜索消息
hide_title: true
---

<center>

## 搜索消息

</center>

### 简要描述
- 按照指定条件搜索消息.

### 请求方式
- `post`

### 请求URL
- `{API_ADDRESS}/msg/search_msg`

### Header
|header名|示例值|选填|类型|说明|
|:---- |:------- |:--- |---|------ |
|operationID|1646445464564|必填|string|用于全局链路追踪,建议使用时间戳,在每个请求中独立|
|token|eyJhbxxxx3Xs|必填|string|[管理员 token](docs/restapi/apis/authenticationManagement/getAdminToken.mdx)|

### 请求参数示例

```json
{
"sendID": "019825",
"recvID": "464588223",
"contentType": 101,
"sendTime": "2025-04-15",
"sessionType": 3,
"pagination": {
"pageNumber": 1,
"showNumber": 2
}
}
```

| 字段名 | 选填 | 类型 | 说明 |
|:------------------------|:-------|:--------|:-----------------------------------------------------|
| sendID | 选填 | string | 消息发送者ID |
| recvID | 选填 | string | 消息接收者ID |
| contentType | 选填 | int | [消息类型](docs/restapi/contentDescription.mdx) |
| sendTime | 选填 | string | 消息发送时间,检索出该时间以后24小时的消息 |
| sessionType | 选填 | int | Session type, 1: 单聊, 3: 群聊, 4: 系统通知 |
| pagination | 必填 | object | 分页参数结构体 |
| pagination.pageNumber | 必填 | int | 当前页码,从1开始 |
| pagination.showNumber | 必填 | int | 当前页请求数量 |

### 成功返回示例

```json
{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": {
"chatLogs": [
{
"chatLog": {
"serverMsgID": "df8147686d3d5073e3e25952b7e68f48",
"clientMsgID": "cd2946aa5c3a0780ef145ece226880c6",
"sendID": "019825",
"recvID": "464588223",
"groupID": "464588223",
"recvNickname": "",
"senderPlatformID": 5,
"senderNickname": "xuzhijvn",
"senderFaceURL": "",
"groupName": "Test Group",
"sessionType": 3,
"msgFrom": 100,
"contentType": 101,
"content": "{\"content\":\"dasda\"}",
"status": 2,
"sendTime": 1744676086645,
"createTime": 1744676086155,
"ex": "",
"groupFaceURL": "",
"groupMemberCount": 24,
"seq": 1916,
"groupOwner": "",
"groupType": 2
},
"isRevoked": false
},
{
"chatLog": {
"serverMsgID": "7f5a3528b0f84ac4e15ca203e9a1ac29",
"clientMsgID": "77833db423190b98a2c1fd291c2075f1",
"sendID": "019825",
"recvID": "464588223",
"groupID": "464588223",
"recvNickname": "",
"senderPlatformID": 5,
"senderNickname": "xuzhijvn",
"senderFaceURL": "",
"groupName": "Test Group",
"sessionType": 3,
"msgFrom": 100,
"contentType": 101,
"content": "{\"content\":\"dasdasdasdasd\"}",
"status": 2,
"sendTime": 1744728041741,
"createTime": 1744728041465,
"ex": "",
"groupFaceURL": "",
"groupMemberCount": 24,
"seq": 1925,
"groupOwner": "",
"groupType": 2
},
"isRevoked": false
}
],
"chatLogsNum": 14
}
}
```

### 成功返回示例的参数说明

| 参数名 | 类型 | 说明 |
|:-------------------|:---------|:----------------------------------------------|
| errCode | int | 错误码,0表示成功 |
| errMsg | string | 错误简要信息,为空 |
| errDlt | errDlt | 错误详细信息,为空 |
| data | object | 通用数据对象,具体结构见下方 |
| chatLogs | array | 消息列表 |
| chatLogs.chatLog | object | [聊天消息](docs/restapi/contentFields.mdx) |
| chatLogs.isRevoked | bool | 消息是否被撤销 |
| chatLogsNum | int | 消息总数 |

### 失败返回示例

```json
{
"errCode": 1004,
"errMsg": "RecordNotFoundError",
"errDlt": ": [1004]RecordNotFoundError"
}
```

### 失败返回示例的参数说明

| 参数名 | 类型 | 说明 |
|:-------------------|:---------|:----------------------------------------|
| errCode | int | 错误码,具体查看全局错误码文档 |
| errMsg | string | 错误简要信息 |
| errDlt | errDlt | 错误详细信息 |
30 changes: 30 additions & 0 deletions docs/restapi/commonFields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,33 @@ title: 常用字段说明
| msgDestructTime | int | | 消息销毁间隔时间 |
| latestMsgDestructTime | int | | 消息最后销毁时间 |
| isMsgDestruct | boolean | | 是否开启消息定时销毁 |

## ChatLog

> 聊天消息.

| 字段名 | 类型 | 最大字符串长度限制 | 说明 | 取值说明 |
| ------------------- | ------ | ----------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| serverMsgID | string | | 服务端消息ID | |
| clientMsgID | string | | 客户端消息ID | |
| sendID | string | | 发送者用户ID | |
| recvID | string | | 接收者用户ID | |
| groupID | string | | 群组ID(群消息) | |
| recvNickname | string | | 接收者昵称 | |
| senderPlatformID | int | | 发送者平台ID | |
| senderNickname | string | | 发送者昵称 | |
| senderFaceURL | string | | 发送者头像URL | |
| groupName | string | | 群组名称 | |
| sessionType | int | | 会话类型 | 1: 单聊, 3: 群聊, 4: 系统通知 |
| msgFrom | int | | 消息来源 | 100: 用户消息, 200: 系统消息 |
| contentType | int | | 消息内容类型 | [内容类型](docs/restapi/contentDescription.mdx) |
| content | string | | 消息内容 | |
| status | int | | 消息状态 | 1: 正常消息, 4: 已删除消息 |
| sendTime | int | | 发送时间 | |
| createTime | int | | 创建时间 | |
| ex | string | | 扩展字段 | |
| groupFaceURL | string | | 群组头像URL | |
| groupMemberCount | int | | 群成员数量 | |
| seq | int | | 消息序列号 | |
| groupOwner | string | | 群主ID | |
| groupType | int | | 群组类型 | 固定值为2 |
Loading