jfrog-aql

1.0.4 • Public • Published

Artifactory Query Language

To read more about AQL.

Set up connection

In order to be able to connect to the server and send request you need to set up the link to the artifactory. An example for using basic authentication:

  var aql = require('aql'),
      username = "fekete.peter",
      password = "lokaki12",
      auth = "Basic " + new Buffer(username + ":" + password).toString("base64");

  // config object is used by the Request class
  aql.config({
        uri: "http://artifactory.mydomain.com/artifactory/api/search/aql",
        headers: {
           Authorization: auth
        }
     });

Method in the config by default is POST. The default transform function is JSON.parse.

Build and run your query

   var aqlQuery = aql.items.find().include("*").limit(10).sort({$asc: ["repo"]});

   aql.query(aqlQuery).then((data) => {
         console.log(data);
      });

Package Sidebar

Install

npm i jfrog-aql

Weekly Downloads

119

Version

1.0.4

License

MIT

Unpacked Size

29.4 kB

Total Files

7

Last publish

Collaborators

  • jnszkr