When ever I run the curl command it's throwing a syntax error. I've followed this documentation to list all artifacts in 'war-release' repo. No idea what's the issue.
$curl -u uname:password -X POST https://<artifactory.com>/artifactory/api/search/aql -d items.find({"repo":"war-release"})
-bash: syntax error near unexpected token `('
Another option that doesn't requires to enclose the query with " or ' and works in most environments is to save the query to file, lets call it aql.query
items.find(
{
"repo":"war-release"
}
)
and then run the following curl command from the same directory that contains the aql.query file (don't forget to replace the templates in the command with your user name, password, host and port).
curl -X POST -uuser:password 'http://host:port/artifactory/api/search/aql' -Taql.query