Artifactory stores Created date, Last Modified date, Last updated date and last downloaded date when an Artifact is deployed or downloaded to and from Artifcatory. These attributes will be useful to know about Artifacts statistics. In this document, we will illustrate the difference between each attribute.
Created Date
This attribute would indicate the timestamp when the Artifact was created(deployed) into Artifactory. The value of this attribute will remain the same even when the Artifact is moved or updated.
Last Modified Date
This attribute would indicate the timestamp from the File system when the item was last modified. The value of this attribute will change when the Artifact gets updated or modified.
Last Updated Date
This attribute would indicate the latest time of upload of the artifact to that particular repository. The value of this attribute will change when the Artifact gets updated or modified.
Last Downloaded Date
This attribute would indicate the timestamp when the Artifact was last downloaded from Artifactory. The value of this attribute will change when the Artifacts gets downloaded.
How can we get the Created, Last Modified, Last Updated and Last Downloaded Date values from the Artifactory?
We can get the value of these attributes from Artifactory UI, Artifactory REST API or Artifactory Database. We have described each step below in detail.
From the Artifactory UI, we have to navigate to respective Artifact under Application -> Artifactory -> Artifacts and then you find the Created Date, Last Modified Date and Last Downloaded Date(If download) under the General Info. Attached below screenshot for reference.
From the Artifactory REST API , we can get the values of these attributes using file info and file statistics REST API. From the file info REST API, we can get the Created Date, Last Modified Date and Last updated Date and from the file statistics REST API, we can get the Last Downloaded Date if Artifact is downloaded at least once else the value will be ‘0’.
From the Artifactory Database, all these attributes are stored in the nodes and stats tables. From the nodes table, we can get the Created Date, Last Modified Date and Last updated Date and from the stats table, we can get the Last Downloaded Date if Artifact is downloaded at least once else we will not have an entry in the stats table. The value of the dates will be stored in the epoch time format. Please you can use an online epoch converter to connect it to human readable format.