Scans List - Get Package Versions

Xray REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Get a list of package versions scanned by Xray.

Security: Requires a valid user with "Read" permissions.

Usage:GET api/v1/packages/{packageName}/versionsorder_by=&direction=&num_of_rows=&offset=&search={string}&updated_at_start{datetime}&updated_at_end={datetime}

Produces: application/json

Parameters:

  • Required: None

  • Optional:

    • order_by:By which column to order the results.

      Allowed values:

      • created_at - This is the default

      • version

    • search:Free text search.

      • version

      • repositories

    • updated_at_start: Return only records updated after the specified time (in RFC 3339 format).

    • updated_at_end: Return only records updated before the specified time (in RFC 3339 format).

    • direction: The direction by which to order the results (either ascending or descending):

      • asc

      • desc

    • num_of_rows: The number ofentries to return.

    • offset: A value returned by the API. It needs to be passed to the API to get the next page. A value of -1 means that the last page was reached.

Sample Response:

{
    "data": [
        {
            "version": "1:1.1.1g-15.fc33",
            "repositories": "RPMs",
            "package_id": "rpm://openssl",
            "sec_issues": {
                "critical": 7,
                "high": 12,
                "low": 32,
                "medium": 89,
                "total": 140
            },
            "violations": 0,
            "updated_at": "2022-07-31T11:57:37+03:00",
            "downloads": 0,
            "description": "",
            "paths": [
                "/rpm/openssl-1.1.1g-15.fc33.src.rpm"
            ]
        }
    ],
    "offset": -1
}

Response Codes:

200: Success

400: Bad request

500: Internal server error