Viewtracker API
How to access and use the public Viewtracker Cloud API.
General Information and Access
The Viewtracker data can be accessed via an API and used for other integrations.
This documentation is about the available endpoints and authentication in the Cloud API.
For any other data related to your Confluence instance, use the Confluence Cloud API by Atlassian.
Access the API via Viewtracker - Interfaces and follow the instructions in the info box.
Open API documentation
The Viewtracker base URL is https://viewtracker.aws.bitvoodoo.cloud
Available endpoints
content views: returns views for specific content.
CODEhttps://viewtracker.aws.bitvoodoo.cloud/api/v2/report/contents/{contentId}/visits
space views: returns views for a specific space.
CODEhttps://viewtracker.aws.bitvoodoo.cloud/api/v2/report/spaces/{spaceKey}/visits
searches: returns searches globally.
CODEhttps://viewtracker.aws.bitvoodoo.cloud/api/v2/report/searches
Authentication
Important Notice
We have introduced a new method for authenticating the Viewtracker API. The old method still listed below will be discontinued as of December 31, 2023.
Obtaining Viewtracker data from the above endpoints is only possible if authorization headers are sent with a valid token. The required token can be generated under the menu Interfaces in the Viewtracker menu.
Note
Authentication of an existing token will no longer work if it is deleted or a new token is generated. The existing API calls must be updated with the latest token in order to retrieve new data.
Examples
Content views example:
curl -D- \
-X GET \
-H "Authorization: Bearer <your_token>" \
"https://viewtracker.aws.bitvoodoo.cloud/api/v2/report/contents/{contentId}/visits"
The above cURL command will not work as shown. You need to replace <your_token>
and <content_id>
with the token generated in Viewtracker and the appropriate content’s id before running it in the terminal.
Space views example:
curl -D- \
-X GET \
-H "Authorization: Bearer <your_token>" \
"https://viewtracker.aws.bitvoodoo.cloud/api/v2/report/spaces/{spaceKey}/visits"
The above cURL command will not work as shown. You need to replace <your_token>
and <space_key>
with the token generated in Viewtracker and the respective space’s key before running it in the terminal.
Searches example:
curl -D- \
-X GET \
-H "Authorization: Bearer <your_token>" \
"https://viewtracker.aws.bitvoodoo.cloud/api/v2/report/searches"
The above cURL command will not work as shown. You need to replace <your_token>
with the token generated in Viewtracker before running it in the terminal.
Explore
Use https://viewtracker.aws.bitvoodoo.cloud/swagger-ui/index.html to explore the mentioned endpoints and their response containing your Viewtracker data.
Proceed as follows for authorization:
Tap on “Authorize”
Enter your user token from the Interface page in the Viewtracker-Bearer-Auth value field
and tap “Authorize”
Expand one of the listed endpoint descriptions and tab “Try it out”
Set the desired parameters and tap “Execute” to get the endpoint response with your data.