Example 1 - Package by name and type

JFrog REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Query

# Query package name and description, filtered by name pattern, ordered by name descending
query {
    packages(
        filter: {
            name: "*ello*",
            packageTypeIn: [NPM, DOCKER]
        },
        first: 3,
        orderBy: {
            field: NAME,
            direction: DESC
        }
    ) {
        edges {
            node {
                name
                description 
            }
        }
    }
}

Sample Result

{
  "data": {
    "packages": {
      "edges": [
        {
          "node": {
            "name": "p2Hello",
            "description": "Sample Package 2"
          }
        },
        {
          "node": {
            "name": "p1Hello",
            "description": "Sample Package 1"
          }
        },
        {
          "node": {
            "name": "library/hello-world",
            "description": null
          }
        }
      ]
    }
  }
}