> 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/list-accessible-contracts.md).

# List Accessible Contracts

You can retrieve the list of contracts that your account credentials are authorized to access using either of the following:

* a `username` and a `password` combination.
* a `token` to access the API.

For more information about obtaining tokens for relevant contracts, see [<mark style="color:blue;">Authentication API for Tokens</mark>](https://api.ionos.com/docs/authentication/v1/#tag/tokens).

## Endpoint

Use the following endpoint to retrieve a list of contracts: `https://api.ionos.com/activitylog/v1/contracts`.

## Request

```bash
curl -X 'GET' \
'https://api.ionos.com/activitylog/v1/contracts' \
-H 'accept: application/json'
```

{% tabs %}
{% 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** lists all the contracts.

```bash
[
  {
    "id": 12345678,
    "type": "contracts",
    "href": "https://api.ionos.com/activitylog/v1/contracts/12345678"
  },
  {
    "id": 98765432,
    "type": "contracts",
    "href": "https://api.ionos.com/activitylog/v1/contracts/98765432"
  }
]
```


---

# 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 dynamically by asking a question.

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

```
GET https://docs.ionos.com/cloud/observability/activity-logs/how-tos/list-accessible-contracts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
