Community API V2 LiQL following query returning empty set
I am trying to retrieve the following data using the query returned in the user object. The query is SELECT * FROM users WHERE followers.id = 'XXXXX' where XXXXX is the user ID that is known to be following other users. I can use the API V1 call to verify the user is following one of the other users but the V2 API is returning an empty set. Must I be authenticated as an admin to retrieve the data using the V2 API or is there some other issue causing the empty set?
Thanks
You can create a proxy endpoint in studio which effectively performs the call in Freemarker using APIv2 and output the raw data in JSON, and you should be able to parse header data into the request using Freemarker as well, I can't see any problems doing that.
You'll need to pass any variables to the endpoint and sanitise them before performing the call which is easy to do and you should be able to pass those variables through the header request or alternatively as URL parameters.
The Freemarker Context Objects documentation for Lithium may help with this.