List vulnerabilities in Dynatrace with the Vulnerabilities API and a segment filter, using query filters, sorting, and a time range to narrow results.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/vulnerabilities/v1/vulnerabilities:segment |
You use the filter and sort query parameters, plus start-time and end-time, to narrow the vulnerability results, and you provide filterSegments in the request body. It returns an array of vulnerabilities from Dynatrace.
To execute this request, you need a platform token or OAuth access token with vulnerability-service:vulnerabilities:read scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| filter | string | The filter parameter, as explained here:
This expression filters the returned vulnerabilities.
Generally, all fields can be used for filtering.
| query | Optional |
| sort | string | The sort parameter, as explained here:
Fields can be prefixed with Generally, all fields with a single value can be used for sorting; however, sorting by fields with array values
such as If this parameter is omitted, the vulnerabilities are sorted by their ids. | query | Optional |
| start-time | string | The start of the requested timeframe. You can use one of the following formats:
| query | Optional |
| end-time | string | The end of the requested timeframe. | query | Optional |
| body | Segment | The JSON body of the request containing the filter segments. | body | Optional |
SegmentRequestBody object| Element | Type | Description | Required |
|---|---|---|---|
| filterSegments | Filter | - | Optional |
FilterSegment objectUse filter segments to define the considered affected entities. For more information see the documentation.
| Element | Type | Description | Required |
|---|---|---|---|
| id | string | - | Required |
| variables | Filter | - | Optional |
FilterSegmentVariable object| Element | Type | Description | Required |
|---|---|---|---|
| name | string | - | Required |
| values | string[] | - | Required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"filterSegments": [{"id": "string","variables": [{"name": "string","values": ["string"]}]}]}
| Code | Type | Description |
|---|---|---|
| 200 | Vulnerabilities | An array of vulnerabilities |
| 400 | - | - |
| 401 | - | - |
| 403 | - | - |
| 404 | - | - |
| 429 | - | - |
| 500 | - | - |
| 501 | - | - |
| 503 | - | - |
Vulnerabilities objectA list of vulnerabilities.
| Element | Type | Description |
|---|---|---|
| vulnerabilities | Vulnerability[] | A list of vulnerabilities. |
Vulnerability objectContains detailed information about the particular vulnerability. For information on the properties see our documentation.
| Element | Type | Description |
|---|---|---|
| id | string | - |
| externalId | string | External provider's unique identifier for the vulnerability. Example: SNYK-JAVA-ORGAPACHEHTTPCOMPONENTS-30646 |
| externalUrl | string | External provider's URL to the details page of the vulnerability. |
| displayId | string | - |
| type | string | - |
| stack | Stack | -The element can hold these values
|
| technology | Technology | -The element can hold these values
|
| title | string | - |
| description | string | - |
| references | References | - |
| resolution | Resolution | - |
| cvss | Cvss | - |
| risk | Risk | - |
| davisAssessment | Davis | - |
| kev | Known | - |
| codeLocation | Code | - |
| affectedEntities | Affected | - |
| vulnerableComponents | Vulnerable | A list of all vulnerable components. |
| isFixAvailable | boolean | - |
| remediation | Remediation | - |
| mute | Mute | - |
| trackingLinkCoveragePercentage | number | Percent of affected entities that have a tracking link assigned. 100% coverage means that every affected entity has a tracking link assigned. Examples: [ 80.5, 30.5 ] |
Stack objectTechnology objectReferences object| Element | Type | Description |
|---|---|---|
| cve | string[] | - |
| cwe | string[] | - |
| owasp | string[] | - |
Resolution object| Element | Type | Description |
|---|---|---|
| status | Status | -The element can hold these values
|
| changeDate | string | - |
Status objectCvss object| Element | Type | Description |
|---|---|---|
| baseScore | number | - |
| version | string | - |
| vector | string | - |
Risk object| Element | Type | Description |
|---|---|---|
| score | number | - |
| level | Risk | -The element can hold these values
|
RiskLevel objectDavisAssessment object| Element | Type | Description |
|---|---|---|
| score | number | - |
| level | Risk | -The element can hold these values
|
| exposureStatus | Exposure | -The element can hold these values
|
| dataAssetsStatus | Data | -The element can hold these values
|
| assessmentMode | Assessment | -The element can hold these values
|
| exploitStatus | Exploit | -The element can hold these values
|
| vulnerableFunctionStatus | Vulnerable | -The element can hold these values
|
| vector | string | - |
ExposureStatus objectDataAssetsStatus objectAssessmentMode objectExploitStatus objectVulnerableFunctionStatus objectKnownExploitedVulnerabilityDetails object| Element | Type | Description |
|---|---|---|
| isInCatalog | boolean | - |
| dueDate | string | - |
CodeLocation object| Element | Type | Description |
|---|---|---|
| name | string | - |
AffectedEntityStatistics object| Element | Type | Description |
|---|---|---|
| count | integer | - |
| types | string[] | - |
| processGroups | Affected | - |
| kubernetesNodes | Affected | - |
| hosts | Affected | - |
| affectedProcesses | Affected | - |
AffectedCounts object| Element | Type | Description |
|---|---|---|
| count | integer | - |
VulnerableComponent object| Element | Type | Description |
|---|---|---|
| id | string | - |
| name | string | - |
| shortName | string | - |
| version | string | - |
| packageName | string | - |
Remediation object| Element | Type | Description |
|---|---|---|
| description | string | - |
Mute object| Element | Type | Description |
|---|---|---|
| status | Mute | -The element can hold these values
|
MuteStatus object{"vulnerabilities": [{"id": "string","externalId": "string","externalUrl": "string","displayId": "string","type": "string","stack": "CODE","technology": "DOTNET","title": "string","description": "string","references": {"cve": ["string"],"cwe": ["string"],"owasp": ["string"]},"resolution": {"status": "OPEN","changeDate": "string"},"cvss": {"baseScore": 1,"version": "string","vector": "string"},"risk": {"score": 1,"level": "NONE"},"davisAssessment": {"score": 1,"level": "NONE","exposureStatus": "NOT_AVAILABLE","dataAssetsStatus": "NOT_AVAILABLE","assessmentMode": "NOT_AVAILABLE","exploitStatus": "NOT_AVAILABLE","vulnerableFunctionStatus": "NOT_AVAILABLE","vector": "string"},"kev": {"isInCatalog": true,"dueDate": "string"},"codeLocation": {"name": "string"},"affectedEntities": {"count": 1,"types": ["string"],"processGroups": {"count": 1},"kubernetesNodes": {},"hosts": {},"affectedProcesses": {}},"vulnerableComponents": [{"id": "string","name": "string","shortName": "string","version": "string","packageName": "string"}],"isFixAvailable": true,"remediation": {"description": "string"},"mute": {"status": "MUTED"},"trackingLinkCoveragePercentage": 1}]}