What to Do When Artifactory Ignores Your REST API Query Params

What to Do When Artifactory Ignores Your REST API Query Params

AuthorFullName__c
Itamar Berman-Eshel
articleNumber
000004741
ft:sourceType
Salesforce
FirstPublishedDate
2019-12-03T08:22:21Z
lastModifiedDate
2023-01-22T11:05:33Z
VersionNumber
4

For certain REST API commands, you may be required to send along additional parameters. These are called query params, which are key-value pairs that appear to the right of the ? in a URL. For example, when adding properties to a file or folder in Artifactory:

PUT /api/storage/libs-release-local/ch/qos/logback/logback-classic/0.9.9?properties=os=win,linux|qa=done&recursive=0

Any params after the initial one (i.e., after properties=os=win) will not be handled unless the entire URL is surrounded by quotes. So, in this case, recursive=0 will be ignored and, as this API defaults to recursive=1, it should be apparent that this param was not handled correctly.

To run this command correctly, you must surround the entire URL with quotation marks:

curl -X PUT -uadmin:password "http://localhost:8081/artifactory/api/storage/libs-release-local/ch/qos/logback/logback-classic/0.9.9?properties=os=win,linux|qa=done&recursive=1"