> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/observability/activity-logs/how-tos/download-activity-log-entries.md).

# Download Activity Log Entries

This operation retrieves activity log entries for a specific contract. You can filter the results by providing either of the date ranges: `startDate` or `endDate`. The number of results displayed on each page depends on the `limit` and `offset` values. While `limit` limits the number of response elements, `offset` specifies the starting point within the collection of resource results returned from the server.

## Endpoint

Use the following endpoint to retrieve the activity log entries: `https://api.ionos.com/activitylog/v1/contracts/{contractNumber}`.

## Request

{% hint style="info" %}
**Note:** Remember to update the sample values in the request with valid ones.
{% endhint %}

```bash
curl -X 'GET' \
'https://api.ionos.com/activitylog/v1/contracts/9876543218374837483?offset=0&limit=20' \
-H 'accept: application/json'
```

{% tabs %}
{% tab title="Path Parameters" %}
To make authenticated requests to the API, the following path parameter is mandatory:

| **Path Parameter** | **Required** | **Type** | **Description**                                                        |
| ------------------ | ------------ | -------- | ---------------------------------------------------------------------- |
| `contractNumber`   | yes          | integer  | Contract number for which the activity log entries must be downloaded. |
| {% endtab %}       |              |          |                                                                        |

{% tab title="Request Header Parameters" %}
To make authenticated requests to the API, the following fields are mandatory in the request header:

| **Header Parameters** | **Required** | **Type** | **Description**                                                                                                                                                    |
| --------------------- | ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Authorization`       | yes          | string   | You can use `Basic Authentication` or a `Bearer token`. For more information, see [Authentication](/cloud/observability/activity-logs/overview.md#authentication). |
| `Content-Type`        | yes          | string   | Set this to `application/json`.                                                                                                                                    |
| {% endtab %}          |              |          |                                                                                                                                                                    |
| {% endtabs %}         |              |          |                                                                                                                                                                    |

## Response

A **200 Successful operation** indicates that the activity logs are being downloaded for the specified contract number.

```bash
{
  "hits": {
    "total": 1,
    "hits":[
      {
        "_source": {
          "@uuid": "c1b9b1b0-7b1b-11e6-9a41-000d3a002f99",
          "meta": {
            "auditVersion": "0.1",
            "time": "2016-09-23T12:02:52.394Z"
          },
          "principal": {
            "sourceIP": "203.0.113.42",
            "identity": {
              "contractNumber": "31721060",
              "username": "user@example.com"
            },
            "sourceService": "ExampleService"
          },
          "event": {
            "param": {},
            "resources": [
              {
                "action": [
                  "sec.user.create"
                ],
                "id": "1466",
                "type": "user"
              }
            ],
            "type": "RequestAccepted"
          }
        }
      }
    ]
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/observability/activity-logs/how-tos/download-activity-log-entries.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
