> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usequotable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Akamai

> Push Akamai DataStream 2 request logs to Agent Analytics through a custom HTTPS destination with a JSON log format.

Akamai DataStream 2 pushes batches of request logs from your property to a custom HTTPS destination. Quotable never needs an EdgeGrid credential: delivery is push only.

## Requirements

* DataStream 2 enabled for the property (CP code) that serves the domain the source is created for.
* Permission to create and activate a stream.

**What it measures:** every field. Cache status is mapped from DataStream's `cacheStatus` (`1` → `HIT`, `0` → `MISS`). DataStream delivers in batches every 30 seconds to a few minutes, so the dashboard lags by that much.

## Set up

**1. Create the source in Quotable**

In **Agent Analytics**, select **Connect source**, choose **Akamai** and select **Generate credentials**. Copy the token, the endpoint URL and the **DataStream 2 data set fields**.

**2. Create a stream**

In Akamai Control Center, create a DataStream 2 stream for your property and select these data set fields:

```text theme={"system"}
reqTimeSec, cliIP, reqHost, reqPath, reqMethod, statusCode, bytes, UA, referer, country, cacheStatus, reqId, turnAroundTimeMSec, cp
```

Don't select `queryStr`. Quotable strips query strings anyway; leaving it out means they never leave Akamai.

**3. Choose the log format**

Select the **JSON** log format.

**4. Configure the destination**

Choose **Custom HTTPS** as the destination:

| Setting | Value |
| - | - |
| Endpoint URL | Your endpoint URL |
| Authentication | None (the token goes in a custom header) |
| Custom header name | `Authorization` |
| Custom header value | `Bearer aa_live_…` |
| Compression | gzip |

**5. Activate and confirm**

Activate the stream. Activation can take a while on Akamai's side. Once logs flow, select **Check now** in Quotable.

## Rotate the token

1. Rotate the token in Quotable. The old token stops working immediately.
2. Edit the stream's destination header with the new token and activate it.

## Disconnect

Deactivate and delete the stream in Akamai, then disconnect the source in Quotable.

## Troubleshooting

| Symptom | Likely cause | Fix |
| - | - | - |
| `401` | Custom header missing, or token wrong or rotated | Check the header is `Authorization: Bearer aa_live_…`. |
| `invalid_record` on every line | The stream uses a structured (non-JSON) format, or `reqHost` or `reqPath` isn't selected | Switch to JSON and check the field list. |
| `host_mismatch` | The CP code serves other hostnames | Connect each domain as its own source. |
| Data lags a few minutes | Expected with DataStream batching | No action needed. |

## Next steps

> [card] [Read the dashboard](https://docs.usequotable.com/agent-analytics/dashboard.md)
>
> What to look at once data arrives.

> [card] [Troubleshooting](https://docs.usequotable.com/agent-analytics/troubleshooting.md)
>
> Fix deliveries that fail or arrive empty.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.