Welcome to the Jazz Community Forum
Is there any way to get the creation time of the asset in RAM (v 7.2.0.1)

One answer

The getCreationTime returns a PersonTime object ... it is for owners to set/get the time it took to create that asset. In any case this API was deprecated, as it was not really used.
What you are looking is for the activities of that Asset... specifically when was it submited (activity 675) or when it was created from an older version (new version, activity 685).
Other asset activities:
What you are looking is for the activities of that Asset... specifically when was it submited (activity 675) or when it was created from an older version (new version, activity 685).
public static void main(String[] args) {
RAMSession session = new RAMSession("http://localhost:8080/ram.ws", "admin", "admin");
session.setWebServiceTimeout(10000);
RAMAsset asset = session.getAsset(new AssetIdentification("{0C972087-F35B-2907-8505-8A8EA00EF600}", "1.0"));
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
long now = cal.getTimeInMillis();
try {
RAMAssetActivity[] activities = asset.getActivites(new int[] {675,685}, 0, now );
for (RAMAssetActivity ramAssetActivity : activities) {
cal.setTimeInMillis(ramAssetActivity.getTimestamp());
System.out.println(cal.getTime());
}
} catch (EntitlementException e) {
e.printStackTrace();
} catch (AssetNotFoundException e) {
e.printStackTrace();
} catch (RAMException e) {
e.printStackTrace();
}
// upload/create the new version to the repository
// Make sure to create the asset with its artifacts, before removing things off
session.put(asset, new NullProgressMonitor());
session.release();
}
Other asset activities:
public static final int METRIC_TYPE_CREATE_ASSET_TAG = 601;
public static final int METRIC_TYPE_DELETE_ASSET_TAG = 603;
public static final int METRIC_TYPE_ASSET_BROWSE = 608;
public static final int METRIC_TYPE_ASSET_DOWNLOAD = 610;
public static final int METRIC_TYPE_ASSET_USAGE = 615;
public static final int METRIC_TYPE_ASSET_SUBSCRIPTION_CREATE = 630;
public static final int METRIC_TYPE_ASSET_SUBSCRIPTION_DELETE = 633;
public static final int METRIC_TYPE_ARTIFACT_BROWSE = 650;
public static final int METRIC_TYPE_SUBMIT_ASSET = 675;
public static final int METRIC_TYPE_UPDATE = 680;
public static final int METRIC_TYPE_ASSET_NEW_VERSION = 685;
public static final int METRIC_TYPE_DELETE_ASSET = 690;
public static final int METRIC_TYPE_PUBLISH_ASSET = 700;
Comments

FYI:
For
RAMAssetActivity[] activities = asset.getActivites(new int[] {675,685}, 0, now )
Use instead
RAMAssetActivity[] activities = asset.getActivites(new int[] {675,685}, -1, -1)
No need to try to compute now to go from 0 to now. -1, -1 is equivalent to this.
For:
cal.setTimeInMillis(ramAssetActivity.getTimestamp());
System.out.println(cal.getTime());
Just use:
System.out.println(ramAssetActivity.getTimestamp());
They are equivalent.