Description: Search all resources (artifacts) that include a specific package version.
Since: 3.130
Applicable Environment: JFrog Cloud, JFrog Self-Hosted
Security: REPORTS_MANAGER
Usage: GET /api/v2/search/impactedResources/PkgVersion
Consumes: application/json
Produces: application/json
Query parameters:
Name | Type | Required/Optional | Default | Description |
|---|---|---|---|---|
| string | required | – | The name of the package to search for. |
| string | required | – | The type of package (e.g., maven, npm, docker, etc.). |
| string | required | – | The version of the package. |
| string | optional | generic | The ecosystem of the package. |
| string | optional | public | The namespace of the package. |
| int | optional | 1000 | The number of resources to return. Max: 10,000 |
| string | optional | – | Cursor for pagination from the previous response. Note: Preserve the original query parameters when using |
Response body:
Name | Type | Description |
|---|---|---|
|
| Response results. |
| string | Pagination cursor for the next page. Empty or absent when there are no more results. |
ResultObject:
Name | Type | Description |
|---|---|---|
| string | Type of impacted resource (e.g., artifact, docker). |
| string | Resource name or manifest file. |
| string | Path to the resource. |
| string | Repository name. |
| string | Resource version (if applicable). |
| string | Artifact file name. |
| object | Details of the artifact’s own package version (type, name, namespace, version, ecosystem). |
| timestamp | RFC 3339 timestamp when the resource was scanned. |
| object | Details of the searched package version (type, name, version, ecosystem). |
Response Codes:
Status Code | Description |
|---|---|
200 | OK |
400 | Bad request - Invalid filter params |
403 | Permission denied |
500 | Internal server error |
Sample Request:
curl -X GET "https://your-xray-instance/api/v2/search/impactedResources/PkgVersion?pkg_version_name=org.apache.tomcat:tomcat-catalina&pkg_version_type=maven&version=8.5.45" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json"
Sample Response:
200 OK
{
"result": [
{
"type": "artifact",
"name": "my-app-1.0.0.jar",
"path": "/path/to/artifact",
"repo": "maven-releases",
"version": "1.0.0",
"artifact_name": "my-app",
"artifact_pkg_version": {
"type": "maven",
"name": "com.example:my-app",
"namespace": "public",
"version": "1.0.0",
"ecosystem": "generic"
},
"scan_date": "2024-01-15T10:30:00Z",
"impacted_pkg_version": {
"type": "maven",
"name": "org.apache.tomcat:tomcat-catalina",
"namespace": "public",
"version": "8.5.45",
"ecosystem": "generic"
}
}
],
"last_key": "<pagination_cursor>"
}