GET api/message/latest?roleName={roleName}

获取一个每个消息类型的最新消息

Request Information

URI Parameters

NameDescriptionTypeAdditional information
roleName

string

Required

Body Parameters

None.

Response Information

Resource Description

ResponseOfListOfLatestMessageOfType
NameDescriptionTypeAdditional information
data

Collection of LatestMessageOfType

None.

errcode

错误码,默认为成功:SUCCESS

string

None.

errmsg

错误信息,默认为:成功

string

None.

Response Formats

application/json, text/json

Sample:
{
  "data": [
    {
      "MessageType": 0,
      "Message": {
        "Id": 1,
        "Title": "sample string 2",
        "Content": "sample string 3",
        "CreateTime": "2025-12-26T20:13:08.2177413+08:00"
      }
    },
    {
      "MessageType": 0,
      "Message": {
        "Id": 1,
        "Title": "sample string 2",
        "Content": "sample string 3",
        "CreateTime": "2025-12-26T20:13:08.2177413+08:00"
      }
    }
  ],
  "errcode": "sample string 1",
  "errmsg": "sample string 2"
}

application/xml, text/xml

Sample:
<ResponseOfArrayOfLatestMessageOfTypeUJ8Augit xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Infrastructure.WebApi">
  <errcode>sample string 1</errcode>
  <errmsg>sample string 2</errmsg>
  <data xmlns:d2p1="http://schemas.datacontract.org/2004/07/DataModel.Exchange.Response">
    <d2p1:LatestMessageOfType>
      <d2p1:Message>
        <d2p1:Content>sample string 3</d2p1:Content>
        <d2p1:CreateTime>2025-12-26T20:13:08.2177413+08:00</d2p1:CreateTime>
        <d2p1:Id>1</d2p1:Id>
        <d2p1:Title>sample string 2</d2p1:Title>
      </d2p1:Message>
      <d2p1:MessageType>Notice</d2p1:MessageType>
    </d2p1:LatestMessageOfType>
    <d2p1:LatestMessageOfType>
      <d2p1:Message>
        <d2p1:Content>sample string 3</d2p1:Content>
        <d2p1:CreateTime>2025-12-26T20:13:08.2177413+08:00</d2p1:CreateTime>
        <d2p1:Id>1</d2p1:Id>
        <d2p1:Title>sample string 2</d2p1:Title>
      </d2p1:Message>
      <d2p1:MessageType>Notice</d2p1:MessageType>
    </d2p1:LatestMessageOfType>
  </data>
</ResponseOfArrayOfLatestMessageOfTypeUJ8Augit>