Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-10159

api/search/aql not allowing admin users to display specific fields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Not a Bug
    • Affects Version/s: 4.7.1
    • Fix Version/s: None
    • Component/s: AQL
    • Labels:
    • Severity:
      High

      Description

      curl -H "Content-type: application/json" -u 'artifactory-api:mypass' -X POST http://artifactory.com:8081/artifactory/api/search/aql -d '
      items.find(
      {
      "$and":[
      {"$or":[
      {"@rpm.metadata.name":{"$match":"test*"}}
      ]},
      {"$or":[
      {"@rpm.metadata.version":{"$match":"1.5.0*"}}
      ]},
      {"$or":[
      {"repo":{"$eq":"yum-locall"}}
      ]}
      ]
      }
      ).
      include("@rpm.metadata.name", "name").limit(4)'

      Not working, getting the following error:
      For permissions reasons AQL demands the following fields: repo, path and name

      The following query is working:

      items.find(
      {
      "$and":[
      {"$or":[
      {"@rpm.metadata.name":{"$match":"test*"}}
      ]},
      {"$or":[
      {"@rpm.metadata.version":{"$match":"1.5.0*"}}
      ]},
      {"$or":[
      {"repo":{"$eq":"yum-local"}}
      ]}
      ]
      }
      ).
      include("@rpm.metadata.name", "repo", "path", "created", "name").limit(4)'

      I want only to get specifiv fields, i don't need the rest of them

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              alex.brodov Alex Brodov (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-10159 -
                  SYNCHRONIZED
                  • Last Sync Date: