Published
on
September 25, 2019
| 2,102 views
| 1 follower
members are following updates on this item.
In a previous post, (New endpoints coming soon) we announced new APIs that developers can use to retrieve content programmatically without impacting view analytics. These APIs are now available for use in your projects, continue reading to learn how they work.
If you're using the /.api/api.svc/objects/{OBJECT_ID}/view endpoint to retrieve content and other object meta from an object, it will count as a 'view' on that object.
What if you don't want it to count as a view? That's where the summary APIs come in! The summary APIs are now part of the v2 family of APIs where you can retrieve the content of the object without tampering with the objects analytics. These APIs are:
/.api2/api/v{version}/communities/{communityKey}/blogs/articles/{articleId}/summary
/.api2/api/v{version}/communities/{communityKey}/wikis/articles/{articleId}/summary
/.api2/api/v{version}/communities/{communityKey}/forums/topics/{topicId}/summary
For each of these endpoints, the required parameters are version, communityKey, and the id of the object (articleId, topicId, etc.)
A successful server response looks like this:
{ "AuthorFirstName": "string", "AuthorId": "string", "AuthorKey": 0, "AuthorLastName": "string", "AuthorNamespace": "string", "Content": "string", "CommentCount": 0, "ContentPath": "string", "FirstImageUrl": "string", "Id": "string", "Key": 0, "LikeCount": 0, "ParentId": "string", "ParentKey": 0, "PublishDate": "2019-07-30T14:42:28.138Z", "Rating": 0, "Summary": "string", "Title": "string", "ViewCount": 0 }
With these new API calls, you can now query your content programmatically without impacting the view count.
If you need any assistance, please don't hesitate to reach out to us!
2 Comments
Hi there! I am sorry to bother with a question that may be trivial. Is it possible to retrieve ALL articles? Thank you!
Thanks Harun, this is great news