> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xpanse-api/xpanse-public-api/vulnerability-testing.md).

# Vulnerability Testing

APIs for vulnerability testing

## Bulk Update Vulnerability Tests

> Enable or disable vulnerability tests. \
> \
> To view vulnerability test results, use the \[Get All Services]\(<https://cortex-panw.stoplight.io/docs/cortex-xpanse/a2aae6dda16c5-get-all-services>) or \[Get Service Details]\(<https://cortex-panw.stoplight.io/docs/cortex-xpanse/b4c3a131602c4-get-service-details>) endpoints.<br>

```json
{"openapi":"3.0.2","info":{"title":"Cortex Xpanse REST API","version":"2.12.0"},"tags":[{"name":"Vulnerability Testing","description":"APIs for vulnerability testing"}],"servers":[{"url":"https://api-{{fqdn}}"}],"paths":{"/public_api/v1/assets/bulk_update_vulnerability_tests/":{"post":{"parameters":[{"in":"header","name":"authorization","description":"api-key","schema":{"type":"string"},"required":true},{"in":"header","name":"x-xdr-auth-id","description":"api-key-id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVulnerabilityTestsResponse"}}}},"400":{"description":"Bad Request. Got an invalid JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultApiErrorResponse"}}}},"401":{"description":"Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultApiErrorResponse"}}}},"402":{"description":"Unauthorized access. User does not have the required license type to run this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultApiErrorResponse"}}}},"403":{"description":"Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_ENTITY"},"500":{"description":"Internal server error. A unified status for API communication type errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultApiErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVulnerabilityTestsRequest"}}}},"summary":"Bulk Update Vulnerability Tests","tags":["Vulnerability Testing"],"description":"Enable or disable vulnerability tests. \n\nTo view vulnerability test results, use the [Get All Services](https://cortex-panw.stoplight.io/docs/cortex-xpanse/a2aae6dda16c5-get-all-services) or [Get Service Details](https://cortex-panw.stoplight.io/docs/cortex-xpanse/b4c3a131602c4-get-service-details) endpoints.\n"}}},"components":{"schemas":{"UpdateVulnerabilityTestsResponse":{"type":"object","properties":{"reply":{"$ref":"#/components/schemas/UpdateVulnerabilityTestsReply"}},"required":["reply"],"additionalProperties":true},"UpdateVulnerabilityTestsReply":{"type":"object","properties":{"bulk_update_result":{"type":"string","enum":["Success"]}},"additionalProperties":true},"DefaultApiErrorResponse":{"type":"object","properties":{"reply":{"description":"The query results upon error.","allOf":[{"$ref":"#/components/schemas/GenericReply"}]}},"required":["reply"],"additionalProperties":true},"GenericReply":{"type":"object","properties":{"err_code":{"type":"string","description":"HTTP response code."},"err_msg":{"type":"string","description":"Error message."},"err_extra":{"type":"string","description":"Additional information describing the error."}},"additionalProperties":true},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors"}}},"UpdateVulnerabilityTestsRequest":{"type":"object","properties":{"request_data":{"$ref":"#/components/schemas/UpdateVulnerabilityTestsRequestData"}},"required":["request_data"],"additionalProperties":true},"UpdateVulnerabilityTestsRequestData":{"type":"object","properties":{"test_names":{"type":"array","description":"Names of tests, for example [\"test1\", \"test2\", \"test3\"]","items":{"type":"string"}},"status":{"type":"string","enum":["enabled","disabled"]}},"additionalProperties":true}},"responses":{"UNPROCESSABLE_ENTITY":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## Get Vulnerability Tests

> Get a complete or filtered list of vulnerability tests. Response include details about each test, including the number of services confirmed vulnerable. \
> \
> To view vulnerability test results, use the \[Get All Services]\(<https://cortex-panw.stoplight.io/docs/cortex-xpanse/a2aae6dda16c5-get-all-services>) or \[Get Service Details]\(<https://cortex-panw.stoplight.io/docs/cortex-xpanse/b4c3a131602c4-get-service-details>) endpoints.\ <br>

```json
{"openapi":"3.0.2","info":{"title":"Cortex Xpanse REST API","version":"2.12.0"},"tags":[{"name":"Vulnerability Testing","description":"APIs for vulnerability testing"}],"servers":[{"url":"https://api-{{fqdn}}"}],"paths":{"/public_api/v1/assets/get_vulnerability_tests/":{"post":{"parameters":[{"in":"header","name":"authorization","description":"api-key","schema":{"type":"string"},"required":true},{"in":"header","name":"x-xdr-auth-id","description":"api-key-id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVulnerabilityTestsResponse"}}}},"400":{"description":"Bad Request. Got an invalid JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultApiErrorResponse"}}}},"401":{"description":"Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultApiErrorResponse"}}}},"402":{"description":"Unauthorized access. User does not have the required license type to run this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultApiErrorResponse"}}}},"403":{"description":"Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_ENTITY"},"500":{"description":"Internal server error. A unified status for API communication type errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultApiErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVulnerabilityTestsRequest"}}}},"summary":"Get Vulnerability Tests","tags":["Vulnerability Testing"],"description":"Get a complete or filtered list of vulnerability tests. Response include details about each test, including the number of services confirmed vulnerable. \n\nTo view vulnerability test results, use the [Get All Services](https://cortex-panw.stoplight.io/docs/cortex-xpanse/a2aae6dda16c5-get-all-services) or [Get Service Details](https://cortex-panw.stoplight.io/docs/cortex-xpanse/b4c3a131602c4-get-service-details) endpoints.\n\n"}}},"components":{"schemas":{"GetVulnerabilityTestsResponse":{"type":"object","properties":{"reply":{"$ref":"#/components/schemas/GetVulnerabilityTestsPage"}},"required":["reply"],"additionalProperties":true},"GetVulnerabilityTestsPage":{"type":"object","properties":{"total_count":{"type":"integer"},"result_count":{"type":"integer"},"vulnerability_tests":{"type":"array","items":{"$ref":"#/components/schemas/VulnerabilityTest"}}},"required":["result_count","total_count"],"additionalProperties":true},"VulnerabilityTest":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"vulnerability_ids":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"status":{"type":"string"},"vendor_names":{"type":"array","items":{"type":"string"}},"affected_software":{"type":"array","items":{"$ref":"#/components/schemas/AffectedSoftware"}},"severity_score":{"type":"number"},"cwe_ids":{"type":"array","items":{"type":"string"}},"epss_score":{"type":"number"},"references":{"type":"array","items":{"type":"string"}},"remediation_guidance":{"type":"string"},"first_published":{"type":"integer"},"created":{"type":"integer"},"count_vulnerable_services":{"type":"integer"}},"additionalProperties":true},"AffectedSoftware":{"type":"object","properties":{"NAME":{"type":"string"},"VERSION_START_INCLUDING":{"type":"string"},"VERSION_START_EXCLUDING":{"type":"string"},"VERSION_END_INCLUDING":{"type":"string"},"VERSION_END_EXCLUDING":{"type":"string"},"VENDOR":{"type":"string"},"PRODUCT":{"type":"string"},"VERSION":{"type":"string"}},"additionalProperties":true},"DefaultApiErrorResponse":{"type":"object","properties":{"reply":{"description":"The query results upon error.","allOf":[{"$ref":"#/components/schemas/GenericReply"}]}},"required":["reply"],"additionalProperties":true},"GenericReply":{"type":"object","properties":{"err_code":{"type":"string","description":"HTTP response code."},"err_msg":{"type":"string","description":"Error message."},"err_extra":{"type":"string","description":"Additional information describing the error."}},"additionalProperties":true},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors"}}},"GetVulnerabilityTestsRequest":{"type":"object","properties":{"request_data":{"$ref":"#/components/schemas/GetVulnerabilityTestsRequestData"}},"required":["request_data"],"additionalProperties":true},"GetVulnerabilityTestsRequestData":{"type":"object","properties":{"filters":{"type":"array","items":{"$ref":"#/components/schemas/VulnerabilityTestFilter"}},"search_from":{"type":"integer","default":0,"minimum":0},"search_to":{"type":"integer","default":500,"minimum":0},"sort":{"$ref":"#/components/schemas/VulnerabilityTestSort"}},"additionalProperties":true},"VulnerabilityTestFilter":{"type":"object","properties":{"field":{"type":"string","enum":["name","test_names","vulnerability_ids","description","vendor_names","status","affected_software","severity_score","cwe_ids","epss_score","count_vulnerable_services"]},"operator":{"type":"string","enum":["in","contains","neq","eq","lte","gte","not_contains"],"description":"Identifies the comparison operator to use for this filter. The following list shows which operator can be used for each filter field:\n  - `name`: contains, eq, neq\n  - `status`: eq\n  - `vulnerability_ids`: contains, not_contains\n  - `description`: contains\n  - `affected_software`: contains, not_contains\n  - `cwe_ids`: contains, not_contains\n  - `vendor_names`: contains, not_contains\n  - `severity_score`: eq, neq, gte, lte\n  - `epss_score`: eq, neq, gte, lte\n  - `count_vulnerable_services`: eq, neq, gte, lte\n"},"value":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"number","format":"float"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"integer"}}],"description":"Value depends on the filter field used.\n  - `name`: string e.g. apache\n  - `status`: Enabled, Disabled\n  - `vulnerability_ids`: strings in the form of CVE IDs, such as CVE-1, CVE-2\n  - `description`: string e.g. apache\n  - `affected_software`: strings\n  - `cwe_ids`: strings in the form of CWE IDs such as CWE-20\n  - `vendor_names`: strings such as Cisco, Siemens\n  - `severity_score`: numbers, such as 2, 3.5\n  - `epss_score`: numbers, such as 2, 3.5\n  - `count_vulnerable_services`: integers, such as 1,2,5\n"}},"additionalProperties":true},"VulnerabilityTestSort":{"type":"object","properties":{"field":{"type":"string","default":"severity_score","enum":["severity_score","created","first_published","status"]},"keyword":{"type":"string","default":"desc","enum":["ASC","asc","DESC","desc"]}},"additionalProperties":true}},"responses":{"UNPROCESSABLE_ENTITY":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/xpanse-api/xpanse-public-api/vulnerability-testing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
