cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Saradhi.Potharaju
AppDynamics Team (Retired)

The time zone IDs available to the Controller Audit History API are Java standard and can be found using getAvailableIDs().

 

Java example script to find available time zone IDs:

 

import java.util.TimeZone;
public class TimeZoneIDAvailable {

public static void main(String args[])
{
String [] Ids = TimeZone.getAvailableIDs();
for (String s: Ids) {
System.out.println(s);
}

}
}

Note: The time range should only be one day for this API, so start and end times can only be 24 hours apart.

 

Example:

 

The time zone ID for Japan is GMT+0900. The + symbol has to be encoded in curl and is represented as "%2B".

curl --user admin@customer1:password http://saradhi:8090/controller/ControllerAuditHistory\?startTime=2017-02-07T06:00:00.607%2B0900\&endTime=2017-02-07T23:50:03.607%2B0900\&timeZoneId=Japan

Output:


[{"timeStamp":1486449446819,"auditDateTime":"2017-02-07T15:37:26.819+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"LOGIN"},{"timeStamp":1486449507278,"auditDateTime":"2017-02-07T15:38:27.278+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"LOGIN"},{"timeStamp":1486449551811,"auditDateTime":"2017-02-07T15:39:11.811+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"LOGIN"},{"timeStamp":1486450129316,"auditDateTime":"2017-02-07T15:48:49.316+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"LOGIN"},{"timeStamp":1486450153704,"auditDateTime":"2017-02-07T15:49:13.704+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"LOGIN"},{"timeStamp":1486450181375,"auditDateTime":"2017-02-07T15:49:41.375+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"OBJECT_CREATED","objectType":"USER","objectName":"test"},{"timeStamp":1486450184451,"auditDateTime":"2017-02-07T15:49:44.451+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"OBJECT_UPDATED","objectType":"USER","objectName":"test"},{"timeStamp":1486450184457,"auditDateTime":"2017-02-07T15:49:44.457+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"USER_ADD_ACCOUNT_ROLE","objectType":"USER","objectName":"test"},{"timeStamp":1486450184463,"auditDateTime":"2017-02-07T15:49:44.463+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"USER_ADD_ACCOUNT_ROLE","objectType":"ACCOUNT_ROLE"},{"timeStamp":1486450221707,"auditDateTime":"2017-02-07T15:50:21.707+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"LOGIN"},{"timeStamp":1486450241029,"auditDateTime":"2017-02-07T15:50:41.029+0900","accountName":"customer1","securityProviderType":"INTERNAL","userName":"admin","action":"LOGIN"}]


In the above output, "+0900" is formatted in the timestamp.

Version history
Last update:
‎06-02-2017 11:18 AM
Updated by: