# Overview

Activity Logs allow contract owners and administrators to view the history of actions performed on your <code class="expression">space.vars.ionos\_cloud</code> resources. You can view the following activities that occur in a specific contract within the <code class="expression">space.vars.ionos\_cloud</code> 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 <code class="expression">space.vars.ionos\_cloud</code> 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.


---

# 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.ionos.com/cloud/observability/activity-logs/overview.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.
