# Overview

Activity Logs allow contract owners and administrators to view the history of actions performed on your IONOS Cloud resources. You can view the following activities that occur in a specific contract within the IONOS Cloud computing environment: user logins, resource provisioning, configuration changes, data access, and more. Based on the report, you can audit the user activities or modify resources, if needed. The activity log is grouped by contract and can be refined using date ranges.

Visibility into your IONOS Cloud activity is essential for security and operational excellence. With Activity Log, you can view, download, analyze, and respond to actions across your resources. In addition, you can also track the following details to help you analyze and respond effectively:

* the source of an action
* resources affected by the activity
* timeline of the events

{% hint style="info" %}
**Note:** An activity log is read-only; hence, all calls to the Activity Log are handled using `GET` requests.
{% endhint %}

## Authentication

The API uses the following two authentication methods:

* **Basic Authentication:** Ensure that the string containing your `username` and `password` is base64-encoded and separated by a colon: `username@domain.tld:password`.
* **Token Authentication:** Provide a header value as `Bearer` followed by your `token`.

## Error Codes

The API may return different error codes depending on the issue encountered. Some common error codes include:

| Error Codes                     | Description                                                                 |
| ------------------------------- | --------------------------------------------------------------------------- |
| **401 (Unauthorized)**          | Indicates invalid authentication credentials.                               |
| **403 (Forbidden)**             | You do not have the necessary permissions to access the requested resource. |
| **500 (Internal Server Error)** | An unexpected error occurred on the server side.                            |

## Example Usage

The following example demonstrates how to download activity log entries for a contract with ID `12345678`:

1. **Choose your authentication method**:
   * For **Basic Authentication**, ensure that your `username` and `password` are base64-encoded and set the `Authorization` header in your request.
   * For **Bearer Token Authentication**, include the `Authorization` header with the value `Bearer` followed by your token.
2. **Make a `GET` request to**: `https://api.ionos.com/activitylog/v1/contracts/12345678`.
3. **Response**: The response will be a `JSON` object containing the activity log entries for the specified contract.
