Format query for comment component

How can I format this to display in the comment component?

{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/745432005/extension/745432005/message-store?availability=Alive&dateFrom=2022-10-12T13:31:00.000Z&page=1&perPage=100",
"records": [
{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/745432005/extension/745432005/message-store/11873285005",
"id": 11873285005,
"extensionId": "745432005",
"to": [
{
"phoneNumber": "+11694548310",
"location": "Cedar Hill, TX"
}
],
"from": {
"phoneNumber": "+11294732823",
"name": "adsfassdadf",
"location": "New York City, NY"
},
"type": "SMS",
"creationTime": "2022-10-13T13:02:37.000Z",
"readStatus": "Read",
"priority": "Normal",
"attachments": [
{
"id": 11873285005,
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/745432005/extension/745432005/message-store/11873285005/content/11873285005",
"type": "Text",
"contentType": "text/plain"
}
],
"direction": "Outbound",
"availability": "Alive",
"subject": "Test SMS using a RingCentral Developer account - 2nd phone number test",
"messageStatus": "Delivered",
"smsSendingAttemptsCount": 1,
"conversationId": 5850999206342210000,
"conversation": {
"id": "5850999206342209508",
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/conversation/5850999206342209508"
},
"lastModifiedTime": "2022-10-13T13:02:41.191Z"
},
{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/745432005/extension/745432005/message-store/11871030005",
"id": 11871030005,
"extensionId": "745432005",
"to": [
{
"phoneNumber": "+11294732823",
"name": "adsfsdfasdfas",
"location": "New York City, NY"
}
],
"from": {
"phoneNumber": "+11149809745"
},
"type": "SMS",
"creationTime": "2022-10-13T00:59:02.000Z",
"readStatus": "Unread",
"priority": "Normal",
"attachments": [
{
"id": 11871030005,
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/745432005/extension/745432005/message-store/11871030005/content/11871030005",
"type": "Text",
"contentType": "text/plain"
}
],
"direction": "Inbound",
"availability": "Alive",
"subject": "Test SMS using a RingCentral Developer account - Got it",
"messageStatus": "Received",
"conversationId": 2012738484213305600,
"conversation": {
"id": "2012738484213305481",
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/conversation/2012738484213305481"
},
"lastModifiedTime": "2022-10-13T00:59:02.869Z"
},
{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/745432005/extension/745432005/message-store/11871016005",
"id": 11871016005,
"extensionId": "745432005",
"to": [
{
"phoneNumber": "+11149809745"
}
],
"from": {
"phoneNumber": "+11294732823",
"name": "adfadsfasf",
"location": "New York City, NY"
},
"type": "SMS",
"creationTime": "2022-10-13T00:52:17.000Z",
"readStatus": "Read",
"priority": "Normal",
"attachments": [
{
"id": 11871016005,
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/745432005/extension/745432005/message-store/11871016005/content/11871016005",
"type": "Text",
"contentType": "text/plain"
}
],
"direction": "Outbound",
"availability": "Alive",
"subject": "Test SMS using a RingCentral Developer account - Test",
"messageStatus": "Delivered",
"smsSendingAttemptsCount": 1,
"conversationId": 2012738484213305600,
"conversation": {
"id": "2012738484213305481",
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/conversation/2012738484213305481"
},
"lastModifiedTime": "2022-10-13T00:52:19.965Z"
}
],
"paging": {
"page": 1,
"totalPages": 1,
"perPage": 100,
"totalElements": 3,
"pageStart": 0,
"pageEnd": 2
},
"navigation": {
"firstPage": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/745432005/extension/745432005/message-store?availability=Alive&dateFrom=2022-10-12T13:31:00.000Z&page=1&perPage=100"
},
"lastPage": {
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/745432005/extension/745432005/message-store?availability=Alive&dateFrom=2022-10-12T13:31:00.000Z&page=1&perPage=100"
}
}
}

Hey @nroeder! Which part of your data would you want to display? I don't think this is possible with our current comment component, actually :frowning:

However, we can try building a component that looks similar!

I assembled this list view component with your data and it looks pretty close. Because it's a list view, we can add more components inside of it (for example, if you'd like to also display the phone number from your data).

See attached app JSON if you want to poke around! You can import this JSON file by clicking Create new (home page) > From JSON!


format-20data-20in-20the-20comment-20component.json

That will work. Thanks.

1 Like