Artifacts With Date in Date Range

JFrog REST APIs

ft:sourceType
Paligo

Description: Get all artifacts with specified dates within the given range. Search can be limited to specific repositories (local or caches).

Since: 3.2.1

Security: Requires a privileged non-anonymous user.

Usage: GET /api/search/dates?[from=fromVal][&to=toVal][&repos=x[,y]][&dateFields=c[,d]]

Parameters: The from and to parameters can be either a long value for the java epoch (milliseconds since the epoch), or an ISO8601 string value. from is mandatory. If to is not provided, now() will be used instead, and if either are omitted, 400 bad request is returned.

The dateFields parameter is a comma separated list of date fields that specify which fields the from and to values should be applied to. The date fields supported are:created,lastModified,lastDownloaded.

It is a mandatory field and it also dictates which fields will be added to the JSON returned.

If ANY of the specified date fields of an artifact is within the specified range, the artifact will be returned.

Produces: application/json (application/vnd.org.jfrog.artifactory.search.ArtifactResult+json)

Sample Output:

GET /api/search/dates?dateFields=created,lastModified,lastDownloaded&from=long&to=long&repos=libs-release-local
{
"results" : [
    {
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver/lib-ver.jar",
        "created": ISO8601,
        "lastModified": ISO8601,
        "lastDownloaded": ISO8601
    },{
        "uri": "http://localhost:8081/artifactory/api/storage/libs-release-local/org/acme/lib/ver2/lib-ver2.jar",
        "created": ISO8601.
        "lastModified": ISO8601,
        "lastDownloaded": ISO8601
    }
]
}