# Attack tests

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.

## Agent attack scorecards uploaded by the org, newest first[#]

GET`/v1/attack/scorecards`scope sandboxes:read

Parameters

`limit`query · integer

At most 50; default 10

Responses

200401403

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

## Upload a signed scorecard from `kosa8 attack run`; the signature is checked before it is stored[#]

POST`/v1/attack/scorecards`scope sandboxes:write

JSON body

`signed`requiredobject

—

Responses

201400401403413422

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

## One scorecard, with the signed file as uploaded[#]

GET`/v1/attack/scorecards/{id}`scope sandboxes:read

Parameters

`id`requiredpath · string

Id

Responses

200401403404

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

---
Source: https://docs.kosa8.com/api/attack-tests/
