Scans List - Get Build Versions

Xray REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

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

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

Usage: GET api/v1/builds/{buildName}/versions?order_by=&direction=&num_of_rows=&offset=&search={string}&created_at_start{datetime}&created_at_end={datetime}&build_repository={string}

Produces: application/json

Parameters:

  • Required:

    • build_repository: The value of the relevant field for the required build.

  • Optional:

    • order_by: By which column to order the results.

      Allowed values:

      • created_at - This is the default

      • version

    • search:Free text search.

      • component_id

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

    • created_at_end: Return only records created 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.0",
            "sec_issues": {
                "total": 0
            },
            "violations": 0,
            "created_at": "2022-07-31T13:16:31+03:00",
            "status": "",
            "ci_server": "",
            "build_agent": "GENERIC/2.17.0",
            "agent": "jfrog-cli-go/2.17.0",
            "component_id": "build://build:1.0",
            "package_id": ""
        }
    ],
    "offset": -1
}

Response Codes:

200: Success

400: Bad request

500: Internal server error