---
title: "Get vendor hostnames affected by a risk"
method: GET
path: "/risks/vendors/hostnames"
tags: ["risks"]
---

# Get vendor hostnames affected by a risk

`GET /risks/vendors/hostnames`

## Request

- Base URL: `https://cyber-risk.upguard.com/api/public`
- URL: `https://cyber-risk.upguard.com/api/public/risks/vendors/hostnames`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/docs/risks/vendors/hostnames/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a list of hostnames for a specific vendor that are affected by a specific risk.
This endpoint provides detailed information about which hostnames have failed a particular
risk check including the detection date and last scan date.

The vendor can be identified either by `vendor_id` (for webless vendors) or `vendor_primary_hostname` (for vendors with or without a web presence).
Exactly one identifier must be provided.

Required API key permissions: `VendorRisk` (select when creating API key in Account Settings)

## Query parameters

- `risk_id` string, required
- `vendor_id` integer
- `vendor_primary_hostname` string

## Response `200`

OK

- ExternalVendorHostnamesWithRiskResponse
  - `hostnames_with_risk` string[]: List of hostnames affected by the risk
  - `risk_details_by_hostname` object: Risk details keyed by hostname

## Other responses

- `403`: Account does not have access to requested entities
- `422`: An invalid parameter was supplied or a mandatory parameter was missing
- `429`: Too many requests have been made to this endpoint.
- `500`: An internal system error occurred

---

[API](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api.md) - [All operations](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/revisions/d044bf6dc61e?raw)
