OpenIsle Docs
API 概览
Send message POST
List conversations GET Find or create conversation POST
Get conversation GET
Api
Messages
Conversations
Conversationid

# Get conversation

Get messages of a conversation

GET
/`api`/`messages`/`conversations`/`{conversationId}`

## Authorization

AuthorizationBearer <token>

In: `header`

## Path Parameters

conversationIdinteger
Format `int64`

## Query Parameters

page?integer
Default `0`
Format `int32`
size?integer
Default `20`
Format `int32`

## Response Body

###

    curl -X GET "https://www.open-isle.com/api/messages/conversations/0?page=0&size=20"

    {
      "id": 0,
      "name": "string",
      "channel": true,
      "avatar": "string",
      "participants": [
        {
          "id": 0,
          "username": "string",
          "avatar": "string"
        }
      ],
      "messages": {
        "totalElements": 0,
        "totalPages": 0,
        "pageable": {
          "pageNumber": 0,
          "pageSize": 0,
          "offset": 0,
          "sort": {
            "sorted": true,
            "empty": true,
            "unsorted": true
          },
          "paged": true,
          "unpaged": true
        },
        "size": 0,
        "content": [
          {
            "id": 0,
            "content": "string",
            "sender": {
              "id": 0,
              "username": "string",
              "avatar": "string"
            },
            "conversationId": 0,
            "createdAt": "2019-08-24T14:15:22Z",
            "replyTo": {
              "id": 0,
              "content": "string",
              "sender": {
                "id": 0,
                "username": "string",
                "avatar": "string"
              },
              "conversationId": 0,
              "createdAt": "2019-08-24T14:15:22Z",
              "replyTo": {},
              "reactions": [
                {
                  "id": 0,
                  "type": "LIKE",
                  "user": "string",
                  "postId": 0,
                  "commentId": 0,
                  "messageId": 0,
                  "reward": 0
                }
              ]
            },
            "reactions": [
              {
                "id": 0,
                "type": "LIKE",
                "user": "string",
                "postId": 0,
                "commentId": 0,
                "messageId": 0,
                "reward": 0
              }
            ]
          }
        ],
        "number": 0,
        "sort": {
          "sorted": true,
          "empty": true,
          "unsorted": true
        },
        "numberOfElements": 0,
        "first": true,
        "last": true,
        "empty": true
      }
    }

Find or create conversation POST

Previous Page

Send message to conversation POST

Next Page

    curl -X GET "https://www.open-isle.com/api/messages/conversations/0?page=0&size=20"