How do I get all the comments posted for a node? The REST API seems not to return them in a usable manner.
{
"_links": {
"self": {
"href": "http://localhost:8080/drupal8/node/3?_format=hal_json"
},
"type": {
"href": "http://localhost:8080/drupal8/rest/type/node/article"
},
"http://localhost:8080/drupal8/rest/relation/node/article/uid": [
{
"href": "http://localhost:8080/drupal8/user/1?_format=hal_json",
"lang": "en"
}
],
"http://localhost:8080/drupal8/rest/relation/node/article/revision_uid": [
{
"href": "http://localhost:8080/drupal8/user/1?_format=hal_json"
}
]
},
"uuid": [
{
"value": "5326216b-0e65-454b-8a48-720b6e6e2402"
}
],
"type": [
{
"target_id": "article"
}
],
"langcode": [
{
"value": "en",
"lang": "en"
}
],
"title": [
{
"value": "Testing Post Article",
"lang": "en"
}
],
"_embedded": {
"http://localhost:8080/drupal8/rest/relation/node/article/uid": [
{
"_links": {
"self": {
"href": "http://localhost:8080/drupal8/user/1?_format=hal_json"
},
"type": {
"href": "http://localhost:8080/drupal8/rest/type/user/user"
}
},
"uuid": [
{
"value": "e7f777b9-8bd7-4f87-a100-d1784d6ed1bc"
}
],
"lang": "en"
}
],
"http://localhost:8080/drupal8/rest/relation/node/article/revision_uid": [
{
"_links": {
"self": {
"href": "http://localhost:8080/drupal8/user/1?_format=hal_json"
},
"type": {
"href": "http://localhost:8080/drupal8/rest/type/user/user"
}
},
"uuid": [
{
"value": "e7f777b9-8bd7-4f87-a100-d1784d6ed1bc"
}
]
}
]
},
"status": [
{
"value": "1",
"lang": "en"
}
],
"created": [
{
"value": "1490939860",
"lang": "en"
}
],
"changed": [
{
"value": "1490939860",
"lang": "en"
}
],
"promote": [
{
"value": "1",
"lang": "en"
}
],
"sticky": [
{
"value": "0",
"lang": "en"
}
],
"revision_timestamp": [
{
"value": "1490939860"
}
],
"revision_translation_affected": [
{
"value": "1",
"lang": "en"
}
],
"default_langcode": [
{
"value": "1",
"lang": "en"
}
],
"body": [
{
"value": "article",
"format": null,
"summary": null,
"lang": "en"
}
],
"comment": [
**{
"status": "2",
"cid": "3",
"last_comment_timestamp": "1490944700",
"last_comment_name": "",
"last_comment_uid": "1",
"comment_count": "2",
"lang": "en"
}**
]
}
As can be seen it gives a count but not the Ids of the Comments..
I am using Drupal 8.0.2