Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Get SC logs to see how many reports each user ran in SC interface via REST API

Avatar

Community Advisor

Hi,

I am trying to get the logs that you can obtain under STAR >> ADMIN TOOLS >> LOGS >> USAGE AND ACCESS LOGS from the SC interface.
We need to create a report that will show how many reports each user viewed during a period of time.

When you run the report in SC you obtain the following URL at the top : https://sc.omniture.com/p/am/1.3/index.html?a=Logs.GetUsageLogUI&ssS...

As you can see there is Logs.GetUsageLogUI. I was hoping that by using the REST API I would be able to extract this data by calling : Logs.GetUsageLogUI.

I used the following code :

private static void getLogs() throws IOException{
Map<String, Object> request = new HashMap<String, Object>();
request.put("date_from","2013-11-16");
request.put("date_to","2013-11-20");
request.put("login","obellot");
request.put("login","obellot");
request.put("dll_csv","0");
request.put("usage_search","Search");
request.put("perm_sort","timestamp");
String response = OMTR_REST.callMethod("Logs.GetUsageLogUI", JSONObject.fromObject(request).toString());
System.out.println(response);}

I am getting the following error : Exception in thread "main" java.io.FileNotFoundException: https://api.omniture.com/admin/1.3/rest/?method=Logs.GetUsageLogUI

My questions :

1.Is it at all possible to extract the logs by using Logs.GetUsageLogUI or any othere method ?
2.If it is possible how can I do that ?

Best regards.

Alexis Cazes

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I think this is now possible based on the following Usage Analytics in Workspace

. Via the API

First, watch this video to learn how to setup 2.0 API calls and find your global company ID. Then, use the following API methods:

NOTE: The eventType usage log field will be numeric; translate it to a string with this lookup tablebefore uploading.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

I think this is now possible based on the following Usage Analytics in Workspace

. Via the API

First, watch this video to learn how to setup 2.0 API calls and find your global company ID. Then, use the following API methods:

NOTE: The eventType usage log field will be numeric; translate it to a string with this lookup tablebefore uploading.