Skip to main content
10-Marble
October 8, 2021
Solved

ThingMark scan logs

  • October 8, 2021
  • 1 reply
  • 2574 views

Hi,

 

We are sharing our ThingMarks with our customers and we would like to see how often a ThingMark is scanned. Each marker is for a predefined customer only. What I am looking for is a log that contains the lifetime history of the usage of a specific ThingMark in the terms of the number of scans and the datetime of each scan. Is it possible to change this command:

 

 

 

 

<es-protocol>://<es-host>:<es-port>/ExperienceService/
compliance/views?startDate=<start-date>&endDate=<enddate>

 

 

 

 

 in such a way that I can find the same information but for a specified ThingMark?

 

Example call:

 

 

 

 

<es-protocol>://<es-host>:<es-port>/ExperienceService/
compliance/views?key=urn:vuforia:vumark:1234:1&startDate=<start-date>&endDate=<enddate> 

 

 

 

 

(I tested this setup and it only results in the overall views and billables).

Example result:

 

 

 

 

{
 "views-marker" = 235,
 "billables-marker" = 156,
 "views" = 470,
 "billables" = 327
}

 

 

 

 

I thought it would be nice to see the marker values and the overall values for comparison in this example, but is not required.

 

Many thanks in advance.

 

With kind regards,

Martini3119

Best answer by RolandRaytchev

Hi @Martini3119 ,

so far I know, one possible option is that we can receive the rawData (requires a admin account for the experience service)

 

Specific time frame:
GET <ES-protocol>://<ES-host>:<ES-port>/ExperienceService/compliance/views?startDate=<start-date>&endDate=<end-date>
For the detailed client information (such as IP/useragent information), below REST API can be used:
GET <ES-protocol>://<ES-host>:<ES-port>/ExperienceService/compliance/views?startDate=<start-date>&endDate=<end-date>&rawData
JSON object with views and billables will be returned
views = gross number of public views by non-registered users
billables = net number of public views by non-registered users

 

example of such call (call all views after.01.2019 -> to the current time) in chrome browser:

 

https://xxxxxxxx.studio-trial.thingworx.io/ExperienceService/compliance/views?startDate=2019-01-01T00%3A00%3A00.000%2B05%3A30&endDate=1000000000000000&rawData

 

and sample results below : ( the last few lines):

 

.....
,{"id":161,"ip":"xx.xxxx.xxxx.184","useragent":"VuforiaView/9.2.1 (iPad7,5; iOS14.6)","namespaceid":".","store":"projects","path":"/test-picker-shader/index.html","contentname":"test-picker-shader","billable":0,"createdon":"1633943984247"}]}

 

So that we can find here in the rawData the project name and the ip where it was called but also the client info. you can check the rawData for called projects - because there e is thingmark - project name relation

1 reply

21-Topaz I
October 11, 2021

Hi @Martini3119 ,

so far I know, one possible option is that we can receive the rawData (requires a admin account for the experience service)

 

Specific time frame:
GET <ES-protocol>://<ES-host>:<ES-port>/ExperienceService/compliance/views?startDate=<start-date>&endDate=<end-date>
For the detailed client information (such as IP/useragent information), below REST API can be used:
GET <ES-protocol>://<ES-host>:<ES-port>/ExperienceService/compliance/views?startDate=<start-date>&endDate=<end-date>&rawData
JSON object with views and billables will be returned
views = gross number of public views by non-registered users
billables = net number of public views by non-registered users

 

example of such call (call all views after.01.2019 -> to the current time) in chrome browser:

 

https://xxxxxxxx.studio-trial.thingworx.io/ExperienceService/compliance/views?startDate=2019-01-01T00%3A00%3A00.000%2B05%3A30&endDate=1000000000000000&rawData

 

and sample results below : ( the last few lines):

 

.....
,{"id":161,"ip":"xx.xxxx.xxxx.184","useragent":"VuforiaView/9.2.1 (iPad7,5; iOS14.6)","namespaceid":".","store":"projects","path":"/test-picker-shader/index.html","contentname":"test-picker-shader","billable":0,"createdon":"1633943984247"}]}

 

So that we can find here in the rawData the project name and the ip where it was called but also the client info. you can check the rawData for called projects - because there e is thingmark - project name relation

10-Marble
October 11, 2021

Hi @RolandRaytchev ,

 

Cool! Works like a charm:

{
 "id": 498,
 "ip": "xxxx",
 "useragent": "Dalvik/2.1.0 (Linux; U; Android 11; AC2003 Build/RP1A.201005.001) VuforiaView/9.2.3.2680 (AC2003; 11)",
 "namespaceid": ".",
 "store": "projects",
 "path": "/xxxx/index.html",
 "contentname": "xxxx",
 "billable": 1,
 "createdon": "1633963917395"
 },
 {
 "id": 499,
 "ip": "xxxx",
 "useragent": "Mozilla/5.0 (Linux; Android 11; AC2003 Build/RP1A.201005.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/94.0.4606.71 Mobile Safari/537.36 VuforiaView/9.2.3.2680 (AC2003; 11)",
 "namespaceid": ".",
 "store": "projects",
 "path": "/xxxx/index.html",
 "contentname": "xxxx",
 "billable": 1,
 "createdon": "1633963917793"
 }

I have a few follow-up questions, if you have the time:

  1. What is the meaning of the "createdon" value? The first ten are the datetime timestamp. As seen in my example, it says 1633963917 (10/11/2021, 4:51:57 PM), but what are the last three numbers for?
  2. Why is the call logged twice, despite being logged in a slightly different manner? Next to the difference in the user agent, there does not seem to be any valuable information present.
  3. It seems I cannot see this data from experiences that require authentication. Could you confirm this, please?

Many thanks in advance!

 

With kind regards,

Martini3119

10-Marble
October 13, 2021

Hi @RolandRaytchev ,

 

Nice! I set the first reply as the solution of this query.

Regarding question #3, I assume the latter will not work, since authentication is already in place based on the admin account, but I will try anyways.

 

Thanks you very much for your assistance!

 

With kind regards,

Martini3119