Conversation
Catalog
GET All
Request path:
https://staging.server.kahla.app/Conversation/All
Request example:
https://staging.server.kahla.app/Conversation/All
Possible Response:
{
"items": [
{
"displayName": "an example string.",
"displayImagePath": "an example string.",
"latestMessage": {
"id": "d80110f5-d9f1-494c-9558-d1228bd6acac",
"conversationId": 0,
"ats": [
{
"targetUserId": "an example string."
}
],
"senderId": "an example string.",
"sender": {
"markEmailPublic": true,
"themeId": 0,
"email": "an example string.",
"enableEmailNotification": true,
"enableEnterToSendMessage": true,
"enableInvisiable": true,
"listInSearchResult": true,
"isOnline": true,
"id": "an example string.",
"bio": "an example string.",
"nickName": "an example string.",
"sex": "an example string.",
"iconFilePath": "an example string.",
"preferedLanguage": "an example string.",
"accountCreateTime": "2021-01-24T14:17:07.5678294Z",
"emailConfirmed": true
},
"sendTime": "2021-01-24T14:17:07.5679218Z",
"content": "an example string.",
"read": true,
"groupWithPrevious": true
},
"unReadAmount": 0,
"conversationId": 0,
"discriminator": "an example string.",
"userId": "an example string.",
"aesKey": "an example string.",
"muted": true,
"someoneAtMe": true,
"online": true
}
],
"code": 0,
"message": "an example string."
}
Possible Response:
{
"code": -1,
"message": "Some error."
}
Possible Response:
{
"items": [
"Some item is invalid!"
],
"code": -10,
"message": "Your input contains several errors!"
}
GET Get message
Request path:
https://staging.server.kahla.app/Conversation/GetMessage
Request example:
https://staging.server.kahla.app/Conversation/GetMessage?id=0&take=0&skipFrom=yourskipFrom
Request arguments:
Name | Required | Type |
---|---|---|
id | Required | Number |
take | Not required | Number |
skipFrom | Not required | Text |
Possible Response:
{
"items": [
{
"id": "13950208-7faf-4905-811a-33c9d158297b",
"conversationId": 0,
"ats": [
{
"targetUserId": "an example string."
}
],
"senderId": "an example string.",
"sender": {
"markEmailPublic": true,
"themeId": 0,
"email": "an example string.",
"enableEmailNotification": true,
"enableEnterToSendMessage": true,
"enableInvisiable": true,
"listInSearchResult": true,
"isOnline": true,
"id": "an example string.",
"bio": "an example string.",
"nickName": "an example string.",
"sex": "an example string.",
"iconFilePath": "an example string.",
"preferedLanguage": "an example string.",
"accountCreateTime": "2021-01-24T14:17:07.5697054Z",
"emailConfirmed": true
},
"sendTime": "2021-01-24T14:17:07.5698032Z",
"content": "an example string.",
"read": true,
"groupWithPrevious": true
}
],
"code": 0,
"message": "an example string."
}
Possible Response:
{
"code": -1,
"message": "Some error."
}
Possible Response:
{
"items": [
"Some item is invalid!"
],
"code": -10,
"message": "Your input contains several errors!"
}
POST Send message
Request path:
https://staging.server.kahla.app/Conversation/SendMessage
Request example:
https://staging.server.kahla.app/Conversation/SendMessage?Id=0&Content=yourContent&At[0]=yourAt&At[1]=yourAt&At[2]=yourAt&MessageId=yourMessageId
Request content type:
application/x-www-form-urlencoded
Form content example:
Id=0&Content=yourContent&At[0]=yourAt&At[1]=yourAt&At[2]=yourAt&MessageId=yourMessageId
Request form:
Name | Required | Type |
---|---|---|
Id | Required | Number |
Content | Required | Text |
At | Not required | Text Collection |
MessageId | Required | Text |
Possible Response:
{
"value": {
"id": "835ea2e2-33c2-4ea1-bb03-da00a7288d61",
"conversationId": 0,
"ats": [
{
"targetUserId": "an example string."
}
],
"senderId": "an example string.",
"sender": {
"markEmailPublic": true,
"themeId": 0,
"email": "an example string.",
"enableEmailNotification": true,
"enableEnterToSendMessage": true,
"enableInvisiable": true,
"listInSearchResult": true,
"isOnline": true,
"id": "an example string.",
"bio": "an example string.",
"nickName": "an example string.",
"sex": "an example string.",
"iconFilePath": "an example string.",
"preferedLanguage": "an example string.",
"accountCreateTime": "2021-01-24T14:17:07.5799387Z",
"emailConfirmed": true
},
"sendTime": "2021-01-24T14:17:07.5800295Z",
"content": "an example string.",
"read": true,
"groupWithPrevious": true
},
"code": 0,
"message": "an example string."
}
Possible Response:
{
"code": -1,
"message": "Some error."
}
Possible Response:
{
"items": [
"Some item is invalid!"
],
"code": -10,
"message": "Your input contains several errors!"
}
GET Conversation detail
Request path:
https://staging.server.kahla.app/Conversation/ConversationDetail
Request example:
https://staging.server.kahla.app/Conversation/ConversationDetail?id=0
Request arguments:
Name | Required | Type |
---|---|---|
id | Required | Number |
Possible Response:
{
"value": {
"requesterId": "an example string.",
"requestUser": {
"markEmailPublic": true,
"themeId": 0,
"email": "an example string.",
"enableEmailNotification": true,
"enableEnterToSendMessage": true,
"enableInvisiable": true,
"listInSearchResult": true,
"isOnline": true,
"id": "an example string.",
"bio": "an example string.",
"nickName": "an example string.",
"sex": "an example string.",
"iconFilePath": "an example string.",
"preferedLanguage": "an example string.",
"accountCreateTime": "2021-01-24T14:17:07.5925236Z",
"emailConfirmed": true
},
"targetId": "an example string.",
"targetUser": {
"markEmailPublic": true,
"themeId": 0,
"email": "an example string.",
"enableEmailNotification": true,
"enableEnterToSendMessage": true,
"enableInvisiable": true,
"listInSearchResult": true,
"isOnline": true,
"id": "an example string.",
"bio": "an example string.",
"nickName": "an example string.",
"sex": "an example string.",
"iconFilePath": "an example string.",
"preferedLanguage": "an example string.",
"accountCreateTime": "2021-01-24T14:17:07.6000557Z",
"emailConfirmed": true
},
"anotherUserId": "an example string.",
"id": 0,
"discriminator": "an example string.",
"aesKey": "an example string.",
"maxLiveSeconds": 0,
"conversationCreateTime": "2021-01-24T14:17:07.6001739Z",
"displayName": "an example string.",
"displayImagePath": "an example string."
},
"code": 0,
"message": "an example string."
}
Possible Response:
{
"value": {
"users": [
{
"id": 0,
"joinTime": "2021-01-24T14:17:07.6018258Z",
"muted": true,
"userId": "an example string.",
"user": {
"markEmailPublic": true,
"themeId": 0,
"email": "an example string.",
"enableEmailNotification": true,
"enableEnterToSendMessage": true,
"enableInvisiable": true,
"listInSearchResult": true,
"isOnline": true,
"id": "an example string.",
"bio": "an example string.",
"nickName": "an example string.",
"sex": "an example string.",
"iconFilePath": "an example string.",
"preferedLanguage": "an example string.",
"accountCreateTime": "2021-01-24T14:17:07.6029658Z",
"emailConfirmed": true
},
"groupId": 0,
"readTimeStamp": "2021-01-24T14:17:07.6030945Z"
}
],
"groupImagePath": "an example string.",
"groupName": "an example string.",
"listInSearchResult": true,
"hasPassword": false,
"ownerId": "an example string.",
"id": 0,
"discriminator": "an example string.",
"aesKey": "an example string.",
"maxLiveSeconds": 0,
"conversationCreateTime": "2021-01-24T14:17:07.6032276Z",
"displayName": "an example string.",
"displayImagePath": "an example string."
},
"code": 0,
"message": "an example string."
}
Possible Response:
{
"code": -1,
"message": "Some error."
}
Possible Response:
{
"items": [
"Some item is invalid!"
],
"code": -10,
"message": "Your input contains several errors!"
}
GET File history
Request path:
https://staging.server.kahla.app/Conversation/FileHistory
Request example:
https://staging.server.kahla.app/Conversation/FileHistory?id=0&skipDates=0
Request arguments:
Name | Required | Type |
---|---|---|
id | Required | Number |
skipDates | Required | Number |
Possible Response:
{
"showingDateUTC": "an example string.",
"siteName": "an example string.",
"rootPath": "an example string.",
"items": [
{
"contextId": 0,
"fileName": "an example string.",
"fileSize": 0,
"uploadTime": "2021-01-24T14:17:07.6100099Z"
}
],
"code": 0,
"message": "an example string."
}
Possible Response:
{
"code": -1,
"message": "Some error."
}
Possible Response:
{
"items": [
"Some item is invalid!"
],
"code": -10,
"message": "Your input contains several errors!"
}
POST Update message life time
Request path:
https://staging.server.kahla.app/Conversation/UpdateMessageLifeTime
Request example:
https://staging.server.kahla.app/Conversation/UpdateMessageLifeTime?Id=0&NewLifeTime=0
Request content type:
application/x-www-form-urlencoded
Form content example:
Id=0&NewLifeTime=0
Request form:
Name | Required | Type |
---|---|---|
Id | Required | Number |
NewLifeTime | Required | Number |
Possible Response:
{
"code": -1,
"message": "Some error."
}
Possible Response:
{
"items": [
"Some item is invalid!"
],
"code": -10,
"message": "Your input contains several errors!"
}