[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:
duplicates RTFACT-12101 NPE when using the Artifacts Not Down... Resolved


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." }


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

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

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

{"$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

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

"created" :

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


Generated at Wed Aug 12 01:33:25 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.