# Threat feed

3 endpoints at `https://api.kosa8.com`, sent with `Authorization: Bearer $KOSA8_API_KEY`. Generated from the API's own [OpenAPI description](https://api.kosa8.com/openapi.json), which a test holds to the router.

## The organization's threat feed: hosts every sandbox is refused[#]

GET`/v1/threats`scope sandboxes:read

Responses

200401403

```
curl -s -X GET https://api.kosa8.com/v1/threats \
  -H "Authorization: Bearer $KOSA8_API_KEY"
```

## Block a host for every sandbox of the organization, at once[#]

POST`/v1/threats`scope sandboxes:write

Added as a deny to every sandbox's egress policy, its own or the organization's; an open policy becomes block:…. Sent to every running and sleeping sandbox within seconds of the answer, and applied at create to new ones. Answers 200 with created: false when the host is already blocked. At most 100 hosts (409 threat_feed_full).

JSON body

`host`requiredstring

Hostname (exact), *.domain, IPv4 address or CIDR

`reason`string

Max length 500.

`sandbox_id`string

The sandbox that flagged it

`source`"anomaly"

Recorded as analyst for a person and api for a key; only anomaly may be given, with sandbox_id

Responses

201400401403404409

```
curl -s -X POST https://api.kosa8.com/v1/threats \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json
```

## Unblock a host everywhere[#]

DELETE`/v1/threats/{id}`scope admin

Unblocking gives access back, so it needs admin, the scope that sets the organization's egress policy.

Parameters

`id`requiredpath · string

The entry's id (thr_…) or its host, URL-encoded

Responses

200401403404

```
curl -s -X DELETE https://api.kosa8.com/v1/threats/$SBX \
  -H "Authorization: Bearer $KOSA8_API_KEY"
```

---
Source: https://docs.kosa8.com/api/threat-feed/
