I was able to do GET method on the votes with provided details below:
1. I created a custom content type and enable like&dislike widget to it.
2. Created a REST export view to show VOTE of all type
3. Format show is Entity.
4. Added Relationship to Content to allow contextual filter by NID.
5. Created another Rest export display with contextual filter by NID.

This is the path when I do GET method:
http://site.com/test?_format=hal_json - to get all votes available
http://site.com/test/1?_format=hal_json - to specify NID, see below output.

[
  {
    "_links": {
      "self": {
        "href": "http://site.com/entity/vote/31?_format=hal_json"
      },
      "type": {
        "href": "http://site.com/rest/type/vote/like"
      },
      "http://site.com/rest/relation/vote/like/entity_id": [
        {
          "href": "http://site.com/node/6?_format=hal_json"
        }
      ],
      "http://site.com/rest/relation/vote/like/user_id": [
        {
          "href": "http://site.com/user/1/stream?_format=hal_json"
        }
      ]
    },
    "id": [
      {
        "value": "31"
      }
    ],
    "uuid": [
      {
        "value": "6441628a-33f1-4933-b881-977d4feba62c"
      }
    ],
    "type": [
      {
        "target_id": "like"
      }
    ],
    "entity_type": [
      {
        "value": "node"
      }
    ],
    "_embedded": {
      "http://site.com/rest/relation/vote/like/entity_id": [
        {
          "_links": {
            "self": {
              "href": "http://site.com/node/6?_format=hal_json"
            },
            "type": {
              "href": "http://site.com/rest/type/node/test"
            }
          },
          "uuid": [
            {
              "value": "947bf8af-50aa-42f8-ab67-d8371afac018"
            }
          ]
        }
      ],
      "http://site.com/rest/relation/vote/like/user_id": [
        {
          "_links": {
            "self": {
              "href": "http://site.com/user/1/stream?_format=hal_json"
            },
            "type": {
              "href": "http://site.com/rest/type/user/user"
            }
          },
          "uuid": [
            {
              "value": "861a67c4-0c1f-4161-9d58-4b3ee9710035"
            }
          ]
        }
      ]
    },
    "value": [
      {
        "value": "1"
      }
    ],
    "value_type": [
      {
        "value": "points"
      }
    ],
    "timestamp": [
      {
        "value": "1490800209"
      }
    ],
    "vote_source": [
      {
        "value": "172.17.0.1"
      }
    ]
  }
]

PROBLEM

Now, my concern is how can I be able to do POST or PATCH to update the vote status in the content.

ATTEMPT

These are the steps I followed to issue POST method and update the vote status, as I am not sure if this is the proper way, but this is the steps I did with POST a regular content(that is working).
1. Access the path: http://site.com/event/vote
2. Added Content-type header and Basic Auth
3. Select POST, and to test I added the code above on the body as raw.

HELPFUL INFORMATION

Some configuration I did:
1. Under /admin/config/services/rest, I enabled the Vote resource name with access to all REST methods.

What I've noticed is when I manually dislike my content on the browser, and when I update my GET, it is no longer available, which is also an expected output.

I am also following this thread, but I still need tips and help to achieve my concern.

Thank you in advance!

Comments

johnreytanquinco created an issue.