Get participants

get

/rest/ofscCollaboration/v1/chats/{chatId}/participants

This operation retrieves the participants of an existing chat. A maximum of 100 participants are retrieved in a single call.

Request

Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : ParticipantList
Type: object
The list of participants of the chat.
Show Source
Nested Schema : items
Type: array
An array of items containing the participant details.
Show Source
Nested Schema : Participant
Type: object
The details of the participant.
Show Source
  • The login of the user who invited the participant to the chat or conference. This field is present only for the chats started by a user.
  • The time (in UTC time zone) when the participant was invited to a chat or conference. The time is specified in 'YYYY-MM-DD HH:MM:SS' format.
  • The time (in UTC time zone) when the participant left the chat. The time is specified in 'YYYY-MM-DD HH:MM:SS' format.
  • The login of the participant.
  • The name of the participant.
  • Contains one of the following values: true or false. If true, then the participant is online. If false, then then the participant is not online.
  • Contains one of the following values: true or false. If true, then the participant is present in the chat. If false, then then the participant is not present in the chat.

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

Examples

The following example shows how to retrieve the participants of an existing chat by submitting a GET request on the REST resource:

cURL Command Example

The following shows an example of the cURL command.

curl -X GET "https://<instance_name>.etadirect.com/rest/ofscCollaboration/v1/chats/1/participants" -H "Accept: application/json" -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...B2A_Zl7o6M7UpDmBK8EA" -H "Content-Type: application/json"

Response Header Example

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx
Date: Thu, 22 Apr 2019 16:28:18 GMT
Content-Type: application/json; charset=utf-8
Connection: close

Response Body Example

The following shows an example of the response body in JSON format.

{
    "totalResults": 2,
    "limit": 10,
    "offset": 0,
    "items": [
        {
            "name": "John Smith",
            "login": "smith",
            "present": true,
            "online": false,
            "invitedBy": "williams",
            "invitedTime": "2019-04-22 14:03:41",
            "leftTime": ""
        },
        {
            "name": "Robert Williams",
            "login": "williams",
            "present": true,
            "online": true,
            "invitedBy": "williams",
            "invitedTime": "2019-04-22 14:03:41",
            "leftTime": ""
        }        
    ],
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.etadirect.com/rest/ofscCollaboration/v1/chats/1/participants/"
        }
    ]
}
Back to Top