Description
Request URL
http://127.0.0.1:8888/api/
Request Method
Parameters
Parameter Name | Required | Parameter Type | Description |
---|
type | Yes | int | API ID |
dbName | No | string | Name of the database, with lower priority than dbHandle |
dbHandle | No | int | Database handle, with higher priority than dbName |
sql | Yes | string | sql |
Request Example
Retrieve a comprehensive list of all friends, including those within chat room
{
"type": 10058,
"dbName": "MicroMsg.db",
"sql": "SELECT chl.smallHeadImgUrl, c.UserName, c.Remark, c.nickName FROM Contact c LEFT JOIN ContactHeadImgUrl chl ON c.UserName = chl.usrName;"
}
Retrieve the list of contacts from your Contances
{
"type": 10058,
"dbName": "MicroMsg.db",
"sql": "SELECT UserName,Remark,NickName,PYInitial,RemarkPYInitial,t2.smallHeadImgUrl FROM Contact t1 LEFT JOIN ContactHeadImgUrl t2 ON t1.UserName = t2.usrName WHERE t1.VerifyFlag = 0 AND (t1.Type = 3 OR t1.Type > 50) and t1.Type != 2050 AND t1.UserName NOT IN ('qmessage', 'tmessage') ORDER BY t1.Remark DESC;"
}
Retrieve chat room list
{
"type": 10058,
"dbName": "MicroMsg.db",
"sql": "SELECT UserName,Remark, NickName,PYInitial,RemarkPYInitial FROM Contact t1 WHERE t1.Type in(2,2050);"
}
Determining whether a group chat is an enterprise group.
{
"type": 10058,
"dbName": "MicroMsg.db",
"sql": "SELECT UserName,Remark, NickName,PYInitial,RemarkPYInitial FROM Contact t1 WHERE t1.Type = 2050 and t1.UserName='xxxx@chatroom';"
}
Obtain Nicknames from Enterprise Groups.
{
"type": 10058,
"dbName": "OpenIMContact.db",
"sql": "SELECT Remark, NickName FROM OpenIMContact t1 where UserName = 'xxxxx@openim'"
}
Return Example
{
"data": {
"status": 0,
"desc": "",
}
}
Return Parameter Description
Parameter Name | Parameter Type | Description |
---|
error_code | int | Error code |
description | string | Error Description |
data | json | Business data |