POST api/Telegram/SendCopilotMessage
Метод для запису логів Copilot
Request Information
URI Parameters
None.
Body Parameters
CopilotMessageName | Description | Type | Additional information |
---|---|---|---|
Chat |
Chat Id |
integer |
None. |
From |
Отправитель |
string |
None. |
EmployeeId |
Код сотрудника |
integer |
None. |
Logging |
Log message with level |
Collection of CopilotLog |
None. |
Request Formats
application/json, text/json
Sample:
{ "Chat": 1, "From": "sample string 2", "EmployeeId": 1, "Logging": [ { "Level": 1, "Message": "sample string 2", "Attachments": [ "sample string 1", "sample string 2" ], "Params": [ { "Code": "sample string 1", "Value": "sample string 2" }, { "Code": "sample string 1", "Value": "sample string 2" } ] }, { "Level": 1, "Message": "sample string 2", "Attachments": [ "sample string 1", "sample string 2" ], "Params": [ { "Code": "sample string 1", "Value": "sample string 2" }, { "Code": "sample string 1", "Value": "sample string 2" } ] } ] }
application/xml, text/xml
Sample:
<CopilotMessage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Data.Repositories.Telegram"> <Chat>1</Chat> <EmployeeId>1</EmployeeId> <From>sample string 2</From> <Logging> <CopilotLog> <Attachments xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </Attachments> <Level>1</Level> <Message>sample string 2</Message> <Params> <CopilotParams> <Code>sample string 1</Code> <Value>sample string 2</Value> </CopilotParams> <CopilotParams> <Code>sample string 1</Code> <Value>sample string 2</Value> </CopilotParams> </Params> </CopilotLog> <CopilotLog> <Attachments xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </Attachments> <Level>1</Level> <Message>sample string 2</Message> <Params> <CopilotParams> <Code>sample string 1</Code> <Value>sample string 2</Value> </CopilotParams> <CopilotParams> <Code>sample string 1</Code> <Value>sample string 2</Value> </CopilotParams> </Params> </CopilotLog> </Logging> </CopilotMessage>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Collection of CopilotResultName | Description | Type | Additional information |
---|---|---|---|
Level |
Level Id, 0 - communication massages, for example, |
integer |
None. |
Id |
Message Id |
integer |
None. |
Response Formats
application/json, text/json
Sample:
[ { "Level": 1, "Id": 2 }, { "Level": 1, "Id": 2 } ]
application/xml, text/xml
Sample:
<ArrayOfCopilotResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Data.Repositories.Telegram"> <CopilotResult> <Id>2</Id> <Level>1</Level> </CopilotResult> <CopilotResult> <Id>2</Id> <Level>1</Level> </CopilotResult> </ArrayOfCopilotResult>