[RTFACT-12062] The 'Artifacts Not Downloaded Since' REST call returns 500 errors Created: 04/Aug/16  Updated: 14/Nov/17  Resolved: 14/Sep/16

Status: Resolved
Project: Artifactory Binary Repository
Component/s: REST API
Affects Version/s: 4.10.0, 4.11.0
Fix Version/s: 4.12.2

Type: Bug Priority: Normal
Reporter: Avi Zaig (Inactive) Assignee: Alexei Vainshtein
Resolution: Duplicate Votes: 1
Labels: None

Issue Links:
Duplicate
duplicates RTFACT-12101 NPE when using the Artifacts Not Down... Resolved

 Description   

This is the rest api command
GET /api/search/usage?notUsedSince=long&createdBefore=long&repos=<repo>

It is failing with a 500 error and NPE when retrieving the results.
results on the terminal
{
"errors" : [

{ "status" : 500, "message" : "An unexpected error has occurred, please check Artifactory logs for further details." }

]
}

artifactory.log
2016-08-04 11:16:01,737 [http-nio-8081-exec-1] [ERROR] (o.a.r.c.e.GlobalExceptionMapper:48) - null
java.lang.NullPointerException: null



 Comments   
Comment by Avi Zaig (Inactive) [ 04/Aug/16 ]

Instead of the REST call, it is possible to use AQL query to get all artifacts notUsedSince AND/OR createdBefore
https://www.jfrog.com/confluence/display/RTF/Artifactory+Query+Language

In the meantime you can use AQL for the same.
The following rest call is used to run AQL queries
Here are some examples:
All the items that have been modified before 2015-07-16T19:20:30.45+01:00 on the repository libs-release-local
items.find(
{
"repo":

{"$eq" : "libs-release-local"}

,
"modified" :

{"$lte" : "2015-07-16T19:20:30.45+01:00"}

}
)

All the artifacts that have were created before 2015-07-01 on the repository libs-release-local
items.find(
{
"repo":

{"$eq" : "libs-release-local"}

,
"created" :

{"$lte" : "2015-07-01"}

}

Generated at Sun Jan 19 11:24:27 UTC 2020 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.