# Read

> The Read routes of the LightHouse API: 55 operations, generated from the OpenAPI document.

Every request goes to your tenant’s own host, `https://<tenant id>.atlanticagenticlabs.com`, and is scoped to that tenant by row-level security. The examples read `AAL_TENANT`, `AAL_KEY` and your Access service token from the environment: see [Authentication](/api/authentication/).

## Agent Map

`GET /api/v1/agent-map`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/agent-map" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/agent-map", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/agent-map`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Agent Requests

`GET /api/v1/agent-requests`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/agent-requests" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/agent-requests", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/agent-requests`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Agents List

`GET /api/v1/agents`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/agents" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/agents", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/agents`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Agent One

`GET /api/v1/agents/{agent_id}`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter  | In   | Type   | Required |
| ---------- | ---- | ------ | -------- |
| `agent_id` | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                        |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/agents/AGENT_ID" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/agents/AGENT_ID", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/agents/AGENT_ID`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Agents Graph

`GET /api/v1/agents/graph`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/agents/graph" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/agents/graph", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/agents/graph`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Last Runs

`GET /api/v1/agents/last-runs`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/agents/last-runs" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/agents/last-runs", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/agents/last-runs`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Attention

`GET /api/v1/attention`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/attention" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/attention", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/attention`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Audit

`GET /api/v1/audit`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/audit" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/audit", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/audit`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Budgets

`GET /api/v1/budgets`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/budgets" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/budgets", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/budgets`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Change Requests

`GET /api/v1/change-requests`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/change-requests" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/change-requests", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/change-requests`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Raise Change

`POST /api/v1/change-requests`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 201    | Created: the new resource, as JSON.                                                         |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl -X POST "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/change-requests" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.post(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/change-requests", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/change-requests`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Delete Connection

`DELETE /api/v1/connections/{cid}`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter | In   | Type   | Required |
| --------- | ---- | ------ | -------- |
| `cid`     | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the request was carried out. The answer is JSON.                                           |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl -X DELETE "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connections/CID" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.delete(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connections/CID", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connections/CID`,
  {
    method: "DELETE",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Post Health

`POST /api/v1/connections/{cid}/health`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter | In   | Type   | Required |
| --------- | ---- | ------ | -------- |
| `cid`     | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the request was carried out. The answer is JSON.                                           |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl -X POST "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connections/CID/health" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.post(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connections/CID/health", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connections/CID/health`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Put Outbound

`PUT /api/v1/connections/{cid}/outbound`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter | In   | Type   | Required |
| --------- | ---- | ------ | -------- |
| `cid`     | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the request was carried out. The answer is JSON.                                           |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl -X PUT "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connections/CID/outbound" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.put(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connections/CID/outbound", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connections/CID/outbound`,
  {
    method: "PUT",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Post Sync

`POST /api/v1/connections/{cid}/sync`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter | In   | Type   | Required |
| --------- | ---- | ------ | -------- |
| `cid`     | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the request was carried out. The answer is JSON.                                           |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl -X POST "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connections/CID/sync" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.post(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connections/CID/sync", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connections/CID/sync`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Get Connectors

`GET /api/v1/connectors`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connectors" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connectors", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connectors`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Get Connector

`GET /api/v1/connectors/{connector}`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter   | In   | Type   | Required |
| ----------- | ---- | ------ | -------- |
| `connector` | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                        |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Post Approval

`POST /api/v1/connectors/{connector}/approval`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter   | In   | Type   | Required |
| ----------- | ---- | ------ | -------- |
| `connector` | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 201    | Created: the new resource, as JSON.                                                            |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl -X POST "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR/approval" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.post(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR/approval", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR/approval`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Post Device

`POST /api/v1/connectors/{connector}/device`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter   | In   | Type   | Required |
| ----------- | ---- | ------ | -------- |
| `connector` | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 201    | Created: the new resource, as JSON.                                                            |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl -X POST "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR/device" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.post(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR/device", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR/device`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Post Token

`POST /api/v1/connectors/{connector}/token`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter   | In   | Type   | Required |
| ----------- | ---- | ------ | -------- |
| `connector` | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 201    | Created: the new resource, as JSON.                                                            |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl -X POST "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR/token" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.post(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR/token", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connectors/CONNECTOR/token`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Get Callback

`GET /api/v1/connectors/callback`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connectors/callback" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connectors/callback", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connectors/callback`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Post Device Approve

`POST /api/v1/connectors/device/{user_code}`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter   | In   | Type   | Required |
| ----------- | ---- | ------ | -------- |
| `user_code` | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the request was carried out. The answer is JSON.                                           |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl -X POST "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/connectors/device/USER_CODE" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.post(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/connectors/device/USER_CODE", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/connectors/device/USER_CODE`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Evals

`GET /api/v1/evals`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/evals" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/evals", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/evals`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Evidence Read

`GET /api/v1/evidence`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/evidence" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/evidence", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/evidence`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Month Forecast

`GET /api/v1/forecast`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/forecast" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/forecast", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/forecast`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Grounding

`GET /api/v1/grounding`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/grounding" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/grounding", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/grounding`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Health

`GET /api/v1/health`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/health" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/health", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/health`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Kills

`GET /api/v1/kills`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/kills" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/kills", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/kills`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Kb List

`GET /api/v1/knowledge-bases`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/knowledge-bases" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/knowledge-bases", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/knowledge-bases`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Kb One

`GET /api/v1/knowledge-bases/{index}`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter | In   | Type   | Required |
| --------- | ---- | ------ | -------- |
| `index`   | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                        |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/knowledge-bases/INDEX" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/knowledge-bases/INDEX", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/knowledge-bases/INDEX`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Models

`GET /api/v1/models`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/models" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/models", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/models`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Get Picker

`GET /api/v1/models/picker`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/models/picker" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/models/picker", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/models/picker`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Put Picker

`PUT /api/v1/models/picker`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the request was carried out. The answer is JSON.                                        |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl -X PUT "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/models/picker" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.put(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/models/picker", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/models/picker`,
  {
    method: "PUT",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Put Residency

`PUT /api/v1/models/residency`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the request was carried out. The answer is JSON.                                        |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl -X PUT "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/models/residency" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.put(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/models/residency", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/models/residency`,
  {
    method: "PUT",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Preapprovals

`GET /api/v1/preapprovals`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/preapprovals" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/preapprovals", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/preapprovals`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Recs

`GET /api/v1/recommendations`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/recommendations" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/recommendations", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/recommendations`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Refusals

`GET /api/v1/refusals`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/refusals" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/refusals", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/refusals`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Releases

`GET /api/v1/releases`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/releases" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/releases", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/releases`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Report

`GET /api/v1/reports/{kind}`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter | In   | Type   | Required |
| --------- | ---- | ------ | -------- |
| `kind`    | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                        |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/reports/KIND" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/reports/KIND", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/reports/KIND`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Retrieval Read

`GET /api/v1/retrieval`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/retrieval" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/retrieval", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/retrieval`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Get Targets

`GET /api/v1/run-targets`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/run-targets" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/run-targets", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/run-targets`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Put Targets

`PUT /api/v1/run-targets`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the request was carried out. The answer is JSON.                                        |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl -X PUT "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/run-targets" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.put(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/run-targets", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/run-targets`,
  {
    method: "PUT",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Get Hosted

`GET /api/v1/run-targets/hosted-requests`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/run-targets/hosted-requests" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/run-targets/hosted-requests", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/run-targets/hosted-requests`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Post Hosted

`POST /api/v1/run-targets/hosted-requests`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 201    | Created: the new resource, as JSON.                                                         |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl -X POST "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/run-targets/hosted-requests" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.post(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/run-targets/hosted-requests", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/run-targets/hosted-requests`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Delete Hosted

`DELETE /api/v1/run-targets/hosted-requests/{rid}`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter | In   | Type   | Required |
| --------- | ---- | ------ | -------- |
| `rid`     | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the request was carried out. The answer is JSON.                                           |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl -X DELETE "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/run-targets/hosted-requests/RID" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.delete(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/run-targets/hosted-requests/RID", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/run-targets/hosted-requests/RID`,
  {
    method: "DELETE",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Get Stack

`GET /api/v1/run-targets/stack`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/run-targets/stack" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/run-targets/stack", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/run-targets/stack`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Runs

`GET /api/v1/runs`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/runs" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/runs", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/runs`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## One Run

`GET /api/v1/runs/{run_id_hash}`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter     | In   | Type   | Required |
| ------------- | ---- | ------ | -------- |
| `run_id_hash` | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                        |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/runs/RUN_ID_HASH" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/runs/RUN_ID_HASH", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/runs/RUN_ID_HASH`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Run Map

`GET /api/v1/runs/{run_id_hash}/map`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter     | In   | Type   | Required |
| ------------- | ---- | ------ | -------- |
| `run_id_hash` | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                        |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/runs/RUN_ID_HASH/map" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/runs/RUN_ID_HASH/map", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/runs/RUN_ID_HASH/map`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Trace

`GET /api/v1/runs/{run_id_hash}/trace`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter     | In   | Type   | Required |
| ------------- | ---- | ------ | -------- |
| `run_id_hash` | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                        |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/runs/RUN_ID_HASH/trace" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/runs/RUN_ID_HASH/trace", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/runs/RUN_ID_HASH/trace`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Active Runs

`GET /api/v1/runs/active`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**200 response:**

```json
{
  "as_of": "2026-10-30T09:00:00Z",
  "stall_after_s": 300,
  "live": {
    "available": true,
    "deployments": [
      {
        "deployment": "example-air-prod",
        "live": true,
        "last_live_at": "2026-10-30T08:59:58Z"
      }
    ],
    "needs": {
      "engine": "0.34.0",
      "revision": "1.12"
    }
  },
  "runs": [
    {
      "run_id_hash": "3f9a0c1e",
      "agent": "research:summary",
      "pack": "research",
      "card": "summary",
      "deployment": "example-air-prod",
      "started_at": "2026-10-30T08:58:10Z",
      "last_seen_at": "2026-10-30T08:59:55Z",
      "elapsed_ms": 110000,
      "state": "running",
      "status": null,
      "attempt": 1,
      "trigger": "schedule",
      "by_hash": null,
      "current_step": {
        "name": "summarise",
        "kind": "model_call",
        "span": "a1b2",
        "started_at": "2026-10-30T08:59:40Z"
      },
      "steps": {
        "started": 4,
        "finished": 3
      },
      "tokens": {
        "input": 5210,
        "output": 840,
        "cache_read": 4096,
        "cache_write": 0
      },
      "cost_usd": 0.0213,
      "estimated": false,
      "calls": 3,
      "approvals_waiting": 0
    }
  ]
}
```

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/runs/active" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/runs/active", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/runs/active`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Active Stream

`GET /api/v1/runs/active/stream`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/runs/active/stream" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/runs/active/stream", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/runs/active/stream`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Get Setup

`GET /api/v1/setup`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/setup" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/setup", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/setup`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Put Setup

`PUT /api/v1/setup/{step}`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Parameter | In   | Type   | Required |
| --------- | ---- | ------ | -------- |
| `step`    | path | string | yes      |

| Status | Meaning                                                                                        |
| ------ | ---------------------------------------------------------------------------------------------- |
| 200    | OK: the request was carried out. The answer is JSON.                                           |
| 400    | Bad request, `bad_query`: a path or query parameter, or a body field, is missing or not valid. |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/).    |

**curl**

```bash
curl -X PUT "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/setup/STEP" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.put(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/setup/STEP", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/setup/STEP`,
  {
    method: "PUT",
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

## Usage

`GET /api/v1/usage`

**Authentication:** A person’s session, or a machine key with your Access service token, as the route’s role allows. A route that approves, decides, pays or changes a limit refuses a machine key (`person_required`).

| Status | Meaning                                                                                     |
| ------ | ------------------------------------------------------------------------------------------- |
| 200    | OK: the JSON document this route reads.                                                     |
| 4XX    | Refused: `{error, message}` with a fixed `error` code, listed under [Errors](/api/errors/). |

**curl**

```bash
curl "https://$AAL_TENANT.atlanticagenticlabs.com/api/v1/usage" \
  -H "Authorization: Bearer $AAL_KEY" \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET"
```

**Python**

```python
import os

import httpx

headers = {
    "Authorization": f"Bearer {os.environ['AAL_KEY']}",
    "CF-Access-Client-Id": os.environ["CF_ACCESS_CLIENT_ID"],
    "CF-Access-Client-Secret": os.environ["CF_ACCESS_CLIENT_SECRET"],
}
r = httpx.get(f"https://{os.environ['AAL_TENANT']}.atlanticagenticlabs.com/api/v1/usage", headers=headers)
r.raise_for_status()
print(r.json())
```

**TypeScript**

```ts
const res = await fetch(
  `https://${process.env.AAL_TENANT}.atlanticagenticlabs.com/api/v1/usage`,
  {
    headers: {
      Authorization: `Bearer ${process.env.AAL_KEY}`,
      "CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID!,
      "CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET!,
    },
  },
);
if (!res.ok) throw new Error(`${res.status}: ${(await res.json()).error}`);
console.log(await res.json());
```

Source: https://docs.atlanticagenticlabs.com/api/reference/read/
