Forum Discussion
Its working absolutely fine for me. You need to be login before using this call.
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 !
- Parshant7 years agoBoss
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.
- STARFLEET7 years agoExpert
Hi Parshant,
thanks again for your reply, but the mentioned query is not wokrking and i am wondering how the query can work for you as the target.id cannot be the id of the board. It is the message id of the bookmarked message. The best example is the response i am getting after doing my calls:
{ "status" : "success", "message" : "", "http_code" : 200, "data" : { "type" : "bookmarks", "list_item_type" : "bookmark", "size" : 1, "items" : [ { "type" : "bookmark", "id" : "54", "href" : "/bookmarks/54", "target" : { "type" : "conversation", "id" : "1337", "view_href" : "/t5/Principles/MyPrinciple3/ba-p/1337", "style" : "blog", "thread_style" : "blog", "messages_count" : 1, "solved" : false, "last_post_time" : "2018-08-13T21:12:58.753+02:00", "last_post_time_friendly" : "Monday" }, "subscriber" : { "type" : "user", "id" : "4", "href" : "/users/4", "view_href" : "/t5/user/viewprofilepage/user-id/4", "login" : "STARFLEET" } } ] }, "metadata" : { } }
You can easily see that the target.id cannot be the board.id.
I've tried it also with target.type='conversation' as i saw the target.type= 'conversation ' in the result.The bookmarked message is in our blog with the id "wlb_community-principles".
I have a second blog which contains no bookmarks of the calling user, but using the blog.id of this will give again back the response above - and this is still wrong.- Parshant7 years agoBoss
If you write target.type = 'conversation' in your query it will return all the conversation means only messages from the bookmarks. You can not pass board.id with the target.type = 'conversation' . You can only pass target.id of related target.type
and If you need to get all bookmark results from your one blog you need to add
target.type = 'board' and target.id='wlb_community-principles'
both in your where clause.
If you are still facing this problem
Related Content
- 12 months ago
- 2 years ago