Scans List - Get Packages



Description: Get a list of builds scanned by Xray.

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

Usage: GET api/v1/packages?order_by=&direction=&num_of_rows=&offset=&search={string}&number_of_versions_start={int}&number_of_versions_end={int}&package_type={choice}

Produces: application/json


  • Required: None

  • Optional:

    • order_by: By which column to order the results.

      Allowed values:

      • updated_at - This is the default

      • created_at

      • name

      • number_of_versions

      • package_type

      • licenses

    • search: Free text search.

      • name

      • package_type

      • licenses

    • number_of_versions_start: Return builds with the minimum specified versions count.

    • number_of_versions_end: Return builds with the maximum specified versions count.

    • package_type: Comma-separated list of package types. Returns only packages of the specified type.

    • 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": [
            "name": "apacheds",
            "package_type": "rpm",
            "number_of_versions": 2,
            "licenses": "Apache-2.0,ASL 2.0,ImageMagick,MIT,Xnet",
            "description": "",
            "created_at": "2022-07-31T11:57:34+03:00",
            "updated_at": "2022-08-04T13:43:40+03:00"
    "offset": 1

Response Codes:

200: Success

400: Bad request

500: Internal server error