List Workloads

JFrog Security User Guide

ft:sourceType
Ftml

Description: List of Workloads

Security:

Usage: POST /runtime/api/v1/workloads

Consumes: application/json

Produces: application/json

Request body

NameTypeRequired/OptionalDescription
limitintrequiredKey-based pagination - number of rows per request
next_keystringoptionalId from the previous request, empty on the first request
order_bystringoptionalAvailable options: name, cluster,runtime_status ,vulnerabilties_count, registry, risks
filtersfilterObjoptionalFilter the results by the available filters listed in filter_object

filterObj:

NameTypeRequired/OptionalDescription
time_periodoptional

Default - now
Options: now, 1 hour, 1 days, 3 days, 7 days, 10 days

cve_idarray[string]optionalCVE identifier
riskarrayoptionalMalicious, untrusted_registry, integrity_violation, critical_applicable
componentArray[filterComponentObj]- all components
applicabilityArray of app_enumoptional

Contextual Analysis result.

Possible values: not_scanned, applicable,

not_applicable, undetermined, rescan_required, upgrade_required, not_covered

severityarray[string]optional

Contextual Analysis result.

Possible values: not_scanned, applicable,

not_applicable, undetermined, rescan_required, upgrade_required, not_covered

workloadsArray[filterWorkloadObj]optionalIf added return data only on workloads that are in the list

filterComponentObj:

NameTypeRequired/OptionalDescription
namestringrequiredComponent name
versionstringoptionalComponent version; if not provided, all versions are returned

filterWorkloadObj:

NameTyoeRequired/OptionalDescription
namestringrequired
namespacestringoptionalName of name space; if not provided all matches the other params (name & cluster)
clusterstringoptionalName of cluster; if not provided all matches the other params (name & namespace)

Response body

NameTypeDescription
total_countintThe total number of images tags that match the filter quarry
paginationpaginationObjPagination info for the request
workloadsArray [workloadObj]

paginationObj:

NameTypeDescription
limitintKey-based pagination - number of rows per request
next_keystringId from the previous request, empty on the first request

workloadObj:

NameTypeDescription
namestringWorkload name
namespacestring
clusterstring
runtime_statusstringPossible values: running, stopped, unknown
nodesArray of string
architecturesArray of stringArray of arch_names
risksArray[ risk_enum]

Possible values: malicious, untrusted_registry, integrity_violation, critical_applicable_cves

untrusted_registry, integrity_violation inherent from images and rest aggregation from process

vulnerabilities_countintThe sum of all vulnerabilities of the process
ProcessesArray[processesObj]

processesObj:

NameTypeDescription
namestring
runtime_statusenumrunning / stopped / unknown
risksArray of risk_enumMalicious/ untrusted_registry/ integrity_violation/ critical_applicable
vulnerabilitiesArray[vulnObj]An array of the vulnerabilities detected on the process
malicious_packagesArray[maliciousObj]An array of malicious packages detected on the image tag
argumentsstring
pathstringFile system path

vulnObj:

NameTypeDescription
cve_idstringCVE identifier
xray_idstringXray identifier
severitystringSeverity level of the issue (e.g., "High")
cvss_v2stringCVSS version 2 score
cvss_v3stringCVSS version 3 score
applicabilitystring

Contextual Analysis result.

Possible values: not_scanned, applicable,

not_applicable, undetermined, rescan_required, upgrade_required, not_covered

componentsarray[componentObj]The components information

maliciousObj:

NameTypeDescription
xray_idstringXray identifier
componentsarray[componentObj]The component information

componentObj:

NameTypeDescription
component_idstringThe component identifier in the Xray format (e.g., "gav://com.thoughtworks.xstream:xstream:1.4.5")
namestringComponent name
versionstringComponent version

Response codes:

Status codeDescription
200OK
400Bad request - Required fields are missing
403Permission denied
404Not found
500Internal server error

Examples

Example request

{
"limit": "50",
"last_key": "id123",

    "filters": {
        "severities": ["Critical", "High"],
"registry" : untrusted_registry,
"workloads": [{
    "name": "corends",
             "namespace":"jfs-production", 
             "cluster":"jfs-production"
}]

    }
 }

Example successful response

200 OK
"pagination": {
"total_count": 105
    "next_key": "87319827319827",
"limit": 10
},
"workloads": [
{
"image_name": string,
"tag": string, // e.g. "1.2.3"
    "architecture": "arch_name", 
"registry": string,
"repository_path": string,
"runtime_status": enum (`running` / `stopped` / `unknown`),  


"risks": [
"<risk-name>", // e.g. applicable_cves, critical_cves
],


"vulnerabilities": [
{
"cve_id": string, 
"applicability": "enum"
}
],

    "workloads" : [
{
"name": string,
"namespace": string, 
"cluster":string
}
]
}]

Example error response:

404 Not Found
{
    "error": "error message"
}