# Integrations

5 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.

## GitHub Actions runners: linked installations and the link to install the kosa8 GitHub App[#]

GET`/v1/integrations/github`scope admin

Jobs whose runs-on includes the kosa8 label then run on an ephemeral self-hosted runner in a persistent sandbox of this org; a kosa8-4x8 (2x4, 8x16, 16x32) label picks the size.

Responses

200401403

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

## GitHub Actions runners: the repositories the linked installations can see, and which run on kosa8[#]

GET`/v1/integrations/github/repos`scope admin

Runners are opt-in per repository: a workflow_job from a repository not turned on is ignored.

Responses

200401403

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

## Turn kosa8 runners on or off for a repository[#]

POST`/v1/integrations/github/repos`scope admin

JSON body

`repo`requiredstring

owner/name, of an account with a linked installation

`enabled`requiredboolean

—

Responses

200400401403404

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

## Stop taking this installation's jobs[#]

DELETE`/v1/integrations/github/{installation_id}`scope admin

Parameters

`installation_id`requiredpath · integer

—

Responses

200401403404

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

## GitHub Actions jobs that ran on kosa8 runners, newest first, with this month's CI minutes[#]

GET`/v1/ci/jobs`scope sandboxes:read

Parameters

`state`query · "queued" | "booting" | "launched" | "busy" | "done" | "failed" | "cancelled"

Only jobs in this state

`repo`query · string

owner/name

`limit`query · integer

How many, 1 to 200 (50)

Responses

200401403

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

---
Source: https://docs.kosa8.com/api/integrations/
