# Custom Log Shipping

### Overview

This integration lets you send access logs directly to Limy's ingestion endpoint via HTTP POST.

Use this when you don't have a CDN or want to send logs from your own infrastructure.

{% stepper %}
{% step %}
**Format your logs**

Send logs as a JSON array to:

```
POST https://stream.getlimy.ai
```

Include these headers:

```
X-API-KEY: lmy_xxxx
User-Agent: Limy-Custom-HTTP/1.0
```

Each log entry needs these fields:

| Field          | Required |
| -------------- | -------- |
| `timestamp`    | ✓        |
| `method`       | ✓        |
| `host`         | ✓        |
| `path`         | ✓        |
| `status_code`  | ✓        |
| `ip`           | ✓        |
| `user_agent`   | ✓        |
| `referer`      | ✓        |
| `query_params` |          |
| `bytes_sent`   |          |
| `duration_ms`  |          |

Max 20MB or 1,000 entries per request.
{% endstep %}

{% step %}
**Send the request**

Example payload:

```json
[
  {
    "timestamp": "2025-06-15T14:30:00Z",
    "method": "GET",
    "host": "domain.com",
    "path": "/shopping",
    "status_code": 200,
    "ip": "192.168.1.1",
    "user_agent": "Mozila...",
    "query_params": {
      "brand": "nike"
    },
    "referer": "https://chatgpt.com"
  }
]
```

{% endstep %}

{% step %}
**Verify it's working**

Navigate to your Limy dashboard and check the Agent Monitor.
{% endstep %}
{% endstepper %}

### Tips

* Batch up to 1,000 logs per request
* Limit request size to 20MB
* Send async so you don't block your app
* Implement retries for failures

### Need More Help?

* Contact `answers@limy.ai` for any further questions


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getlimy.ai/limy-pixel/cdn-integration/custom-log-shipping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
