Return JSON object that lists messages based on advanced query filter parameters. Note: Use nextPageUrl and prevPageUrl from the response data for query pagination.

URL Parameters

NameDescriptionLocationRequiredDefault Value
spaceIdUnique identifier of the space.pathYes
refTimeUTC timestampqueryNocurrent timestamp
directionList messages 'before' or 'after' refTime.queryNoafter
category'chat', 'idea', or 'task'queryNo
parentmsg_category'none' (returns messages for chat only), 'idea', or 'task'queryNo'none'
file_only'yes', 'y', or 'true'. Returns only files of the messages.queryNo
chatmsg_only'yes', 'y', or 'true'. Returns chat text messages only.queryNo
searchstringSearch text to filter messages.queryNo
sizeNumber of messages to return.queryNo30 (max: 50)
pagerefReadonly. This parameter is not used by Spaces and is only a reference. i.e.: the value sent will be the same value returned.queryNo
nextRefObjIdMessageId of the next message.queryNo
prevRefObjIdMessageId of the previous message.queryNo

Body Parameters

None.

Authentication

JwtAuthenticator, Oauth2Authenticator, AnonymousAuthenticator

Authorization

PERM_TOPIC_READ

Example Request

URL

For Production: GET https://spacesapis.avayacloud.com/api/spaces/{spaceId}/messages/query
For Staging: GET https://loganstagingapis.esna.com/api/spaces/{spaceId}/messages/query

Headers

Authorization: "jwt eyJhbGciOiJSUzI1NiIsIdfgdfgnR5cCI6IkpXVCJ9.eyJ1c2VyX2lkX3NpZyI6ImxPWHpxNzVzR3J3X0xwWEMyRGRMakhyYXJlWVhyTzFMdEZHZkhkOWNkTXciLCJwcm9kdWN0X3R5cGUiOiJhY2NvdW50cyIsImxhc3R1cGRhdGV0aW1lIjoiMjAxNy0wMS0zMFQxMzo1ODo0Ny4yMDYiLCJpc3MiOiJ6YW5nLmlvIiwicHVibGlja2V5aWQiOiJhZ3h6Zm05dVpYTnVZVEl3TVRSeUdnc1NEVWRLZDNSUWRXSnNhV05MWlhrdfgdWdJQ2dsUEtFakFvTSIsImV4cCI6MTQ5NTM5MTIwMywidXNlcl9pZCI6ImFneHpmbTl1WlhOdVlUSXdNVFJ5RVFzU0JGVnpaWElZZ0lEQXMtX25fUW9NIiwidmVyIjoiMi4wIn0.SqZpw1uPIebqW3qlDsm0-DWYFKEH0SgPwtD-tSESWOF-5hLkZMqJH28ooWux2S7s9riIew7pTVPnZpTgJa5zHcEAG0gXSEJVOqmpGp_4ufM8YtZoZMpBFjyAkwyAt-ILkGUYIo0GU5WyzMPLV8YLXfgdfgOgkE2MGGOajBkjPmC2Db3pA0D0M9k-21EL1gwWBC5YIq0PDAkgulegwl6khRmB8irJQ-dfg-d-KV9eYfFpsCdJKRGzSfqg"

Or

Authorization: "bearer f746696f5de4528u128ae2f274eea253e8a7943a"

Example Response

{
    "data": [
        {
            "_id": "5f118d83ef2a4892478ffa7f",
            "sender": {
                "_id": "5eeb4e49aa4a347af9c7bd13",
                "username": "user1@avaya.com",
                "displayname": "Username1",
                "picture_url": "https://storage.googleapis.com/onesna/pictures/pfpic_85c55d13-6f87-42f4-a576-c1a5a87dc..."
                "type": "user"
            },
            "content": {
                "endTime": null,
                "mediaMode": "audio",
                "virtualEndTime": null,
                "meetingStatus": "active",
                "bodyText": "<p>test</p>",
                "data": [],
                "description": "",
                "assignees": [],
                "attendees": [],
                "startTime": "2020-07-17T11:37:39.423Z",
                "recordings": []
            },
            "chatCount": 0,
            "likeCount": 0,
            "status": 0,
            "category": "chat",
            "topicId": "5f118d7c10ea162d7e8eac88",
            "created": "2020-07-17T11:37:39.417Z",
            "modified": "2020-07-17T11:37:39.417Z",
            "__v": 0
        }
    ],
    "nextPageUrl": "",
    "previousPageUrl": "",
    "total": 1
}