LoudVoice API \ Comments \ List all comments

Resource/URI - Discussions GET POST PUT DELETE
Discussions /loudvoice/discussions.json List all discussions Create a discussion
Discussion /loudvoice/discussions/<discussion_token>.json /loudvoice/discussions/discussion.json?
discussion_reference=<discussion_reference>
Read a discussion Update a discussion Delete a discussion
Discussion messages /loudvoice/comments/<discussion_token>/comments.json /loudvoice/discussions/discussion/comments.json?
discussion_reference=<discussion_reference>
Read discussion comments
Resource/URI - Authors GET POST PUT DELETE
Authors /loudvoice/authors.json List all authors Create an author
Author /loudvoice/authors/<author_token>.json /loudvoice/authors/author.json?
author_reference=<author_reference>
Read an author Update an author Delete an author
Resource/URI - Author Sessions GET POST PUT DELETE
Author Sessions /loudvoice/authors/sessions.json Create/Update a session
Author Session /loudvoice/authors/sessions/<session_token>.json Delete a session
Resource/URI - Comments GET POST PUT DELETE
Comments /loudvoice/comments.json List all comments Create a comment
Comment /loudvoice/comments/<comment_token>.json Read a comment Update a comment Delete a comment

Workflow

Request: the code to send to the API

Send a GET request to the resource /loudvoice/comments.json to obtain the complete list of your comments. This endpoint returns comments included in all of your discussions. To retrieve the comments of a specific discussion you can use the following endpoint.

Result: the code returned by the API

The API will return a list of comments including their respective author and the discussion that the comment is part of. Requests that return multiple entries will be paginated to 250 items by default.

Example Resultset

{
    "response": {
        "request": {
            "date": "Mon, 19 Mar 2018 13:53:32  0100",
            "resource": "/loudvoice/comments.json",
            "status": {
                "flag": "success",
                "code": 200,
                "info": "Your request has been processed successfully"
            }
        },
        "result": {
            "data": {
                "comments": {
                    "pagination": {
                        "current_page": 1,
                        "total_pages": 1,
                        "entries_per_page": 250,
                        "total_entries": 2,
                        "order": {
                            "field": "post_order",
                            "direction": "asc"
                        }
                    },
                    "count": 10,
                    "entries": [
                        {
                            "comment_token": "47c30277-6537-48be-81a8-04eaae6f0234",
                            "comment_reference": null,
                            "date_creation": "Wed, 14 Mar 2018 14:18:30  0100",
                            "date_last_update": null,
                            "post_order": 1,
                            "has_been_approved": true,
                            "is_spam": false,
                            "is_trashed": false,
                            "ip_address": "127.0.0.1",
                            "text": "Great Job !",
                            "author": {
                                "author_token": "e570f17a-f018-49f2-be95-35dd31105c93",
                                "author_reference": "USER-1234",
                                "date_creation": "Wed, 14 Mar 2018 14:18:55  0100",
                                "name": "Jane Doe",
                                "email": "jane@example.com",
                                "description": null,
                                "website_url": "http://example.com",
                                "num_comments": 2,
                                "date_last_comment": "Wed, 14 Mar 2018 14:19:49  0100"
                            },
                            "discussion": {
                                "discussion_token": "7da3805b-1c37-463e-a53f-b7f6edc3ef2f",
                                "discussion_reference": "PAGE-111",
                                "date_creation": "Wed, 14 Mar 2018 14:19:48  0100",
                                "title": "Loudvoice discussion",
                                "url": "http://docs.oneall.com/api/resources/loudvoice/",
                                "num_comments": 2,
                                "date_last_comment": "Wed, 14 Mar 2018 14:20:05  0100"
                            }
                        },
                        {
                            "comment_token": "d8fc42df-6225-4e6a-b800-71790281aafd",
                            "comment_reference":null,
                            "date_creation": "Wed, 14 Mar 2018 14:19:49  0100",
                            "date_last_update": null,
                            "post_order": 2,
                            "has_been_approved": true,
                            "is_spam": false,
                            "is_trashed": false,                            
                            "ip_address": "172.16.0.1",
                            "text": "Nice API thank you",
                            "author": {
                                "author_token": "e570f17a-f018-49f2-be95-35dd31105c93",
                                "author_reference": "USER-7890",
                                "date_creation": "Wed, 14 Mar 2018 14:18:55  0100",
                                "name": "John Doe",
                                "email": "john@example.com",
                                "description": null,
                                "num_comments": 2,
                                "date_last_comment": "Wed, 14 Mar 2018 14:19:49  0100"
                            },
                            "discussion": {
                                "discussion_token": "7da3805b-1c37-463e-a53f-b7f6edc3ef2f",
                                "discussion_reference": "PAGE-111",
                                "date_creation": "Wed, 14 Mar 2018 14:19:48  0100",
                                "title": "Loudvoice discussion",
                                "url": "http://docs.oneall.com/api/resources/loudvoice/",
                                "num_comments": 2,
                                "date_last_comment": "Wed, 14 Mar 2018 14:20:05  0100"
                            }
                        }
                    ]
                }
            }
        }
    }
}

User Contributed Notes