Forum Discussion

STARFLEET's avatar
STARFLEET
Expert
7 years ago

REST Call buggy for Bookmarks of a specific node ?

Hi,

I am trying to get the bookmarks of a user via Lithium V2 API  for a specific node only.

According to the documentation there is the contrain node.id which should do the job.
Nevertheless i am getting always the total bookmarks - my expectation would be getting the bookmarks in the scope of the given node.id. Seems to be buggy.

Link to the API V2 documentation:

https://lithosphere.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv2&collection=bookmarks

Here is my V2 query easily checkable via API Browser :

SELECT * FROM bookmarks WHERE node.id='boards:mynodeid'

Is that a bug ?
Tested on:

Revision: 18.6 (18.6-release r1808081133) 
Commit Id: 5c8698eba9db4d2ffe18decd825b2a42da7a2673 
Timestamp: 1808081133

 

    • STARFLEET's avatar
      STARFLEET
      Expert

      Hi Parshant,

      thank you for your quick reply .... i am unsure what you mean with your statement you need to login  before ..

      When trying the call with API Browser inside Studio i am always signed in otherwise i could not reach the API Browser :-)

      Maybe i should make it a little more transparent how you can reproduce it:

      Preparation:

      1.  create a new board (type Blog)  with the board-id e.g. "myblog1"
      2. create an additional board (tpye Blog) with the board-id e.g. "myblog2"
      3. create several blog articles per blog
      4. now bookmark an article of "myblog1" without bookmarking other articles in "myblog2"

      Test it via API Browser

      - after bookmarking the article in "myblog1" visit the API Explorer in Studio
      - now make the following call: SELECT * FROM bookmarks WHERE node.id='boards:myblog1'
      - Expectation: in the response you should see the bookmarked article of myblog1 ( this works)
      - now make the following call: SELECT * FROM bookmarks WHERE node.id='boards:myblog2'
      - Expectation: in the response there should be no found bookmark, instead it will show again the bookmark of myblog1 article and this is not the expected result !

       

      • Parshant's avatar
        Parshant
        Boss

        STARFLEET

        I thought You were making the V2 call directly from browser and not from studio.

        I have found the way to figure out this issue on your side.

        Use below API to fetch results for bookmark from Board using your example

        SELECT * FROM bookmarks WHERE target.type = 'board' and target.id='myblog1'

        I have tested this on our community as well and its works like a charm.