> 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/api-reference/observability/activity-log/contracts/download-activity-log-entries.md).

# Download Activity Log entries.

This operation returns the actual activity log data related to the specific **contractNumber** supplied in the request. The amount of data returned can be limited by providing one or both of the optional **dateStart** and **dateEnd** parameters.

If valid values for both **dateStart** and **dateEnd** are supplied, then the activity log information for the date range specified will be returned. Omitting either **dateStart** or **dateEnd** will return all entries available after **dateStart** or before **dateEnd**.

For pagination use the **offset** and **limit** parameters.

```json
{"openapi":"3.0.3","info":{"title":"Activity Log Service API","version":"v1"},"tags":[{"name":"Contracts"}],"servers":[{"url":"https://api.ionos.com"}],"security":[{"Basic_Authentication":[]},{"Token_Authentication":[]}],"components":{"securitySchemes":{"Basic_Authentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n   <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication\n","scheme":"basic"},"Token_Authentication":{"type":"apiKey","name":"Authorization","in":"header","description":"Please provide header value as 'Bearer ' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token."}},"schemas":{"GetByContractResponse":{"description":"Activity log data related to the specific contractId","type":"object","properties":{"hits":{"type":"object","description":"The container for the found activity event data.","properties":{"total":{"type":"integer","description":"A count of total number of available activity events."},"hits":{"type":"array","items":{"type":"object","properties":{"_source":{"type":"object","description":"The payload of a single activity event.","properties":{"principal":{"type":"object","description":"The person or process which triggered the event.","properties":{"sourceIP":{"type":"string","description":"The remote IP address which triggered the activity."},"identity":{"type":"object","description":"The identity of the user who triggered the activity.","properties":{"contractNumber":{"type":"integer","description":"The customer contract number."},"username":{"type":"string","description":"The user name."}}},"sourceService":{"type":"string","description":"The principal triggered the activity using this IONOS service.\n\nExample values are \n* `PUBLIC_REST_V6` for the CloudAPI V6,\n* `Reseller_V1` for the Reseller API V1 or\n* `DCD` for the Data Center Designer.\n"},"serviceHost":{"type":"string","description":"The FQDN of the hostname on which the service runs.\n"}}},"meta":{"type":"object","description":"Meta information about the activity event.","properties":{"auditVersion":{"type":"number","description":"The values returned is currently 0.1."},"requestId":{"type":"string","description":"Identifier of the individual request which triggered the activity."},"queueRefId":{"type":"integer","description":"Identifier of the provisioning queue reference. Use this value to group different events that were part of the same provisioning request."},"time":{"type":"string","description":"Combined date and time of the activity event in UTC."},"transactionId":{"type":"string","description":"Identifier of the transaction which triggered the activity."}}},"event":{"type":"object","description":"Details specific to the activity event.","properties":{"param":{"type":"object","description":"Additional parameters for the given `type` of activity event.","properties":{"action":{"type":"string","description":"HTTP protocol method used to trigger the activity.","enum":["GET","POST","PATCH","PUT","DELETE"]},"error":{"type":"object","description":"Details of the error response returned for a given activity.","properties":{"httpStatus":{"type":"string","description":"HTTP error code for the given activity."},"messages":{"type":"array","description":"An array of error messages corresponding to the given activity.","items":{"type":"object","properties":{"errorCode":{"type":"string","description":"Internal error code generated by the given activity."},"message":{"type":"string","description":"Details of the specific error generated by the given activity."}}}}}},"uri":{"type":"string","description":"HTTP URI for the given activity request."},"initiator":{"type":"string","description":"Component which initiated the activity. Usually equivalent to sourceService in the **principal** section."},"errorCode":{"type":"string","description":"Internal error code generated by the given activity."},"sourceService":{"type":"string","description":"The IONOS service in which the activity took place.\n\nExample values are\n`PUBLIC_REST` for the CloudAPI or\n`Provisioning` for events happening during the asynchronous\nresource provisioning process.\n"}}},"resources":{"type":"array","description":"An array of resources affected by the given activity.","items":{"type":"object","properties":{"action":{"type":"array","description":"An array of items containing a string describing the\naction that was performed on the resource. There are\na large number of possible values returned here.\n\nSome example values are \n* in the security domain `sec.user.create` for a user \n  creation, \n* in the IP domain `ip.ipblock.reserve` for reserving an \n  IP block,\n* in the virtual resources domain `vr.firewall.activate` for \n  a firewall activation or\n* in the snapshot domain `sn.snapshot.create` for creating\n  a snapshot.\n","items":{"type":"string"}},"id":{"type":"string","description":"Identifier of the given resource."},"type":{"type":"string","description":"Type of the given resource. Example values are\n\n* `datacenter`,\n* `firewallrule` or\n* `backupUnit`.\n"}}}},"message":{"type":"string","description":"Message explaining the current status of the request."},"status":{"type":"string","description":"The current status of the request.","enum":["DONE","RUNNING","QUEUED","FAILED"]},"type":{"type":"string","description":"Type of the activity event. The exact contents of the `event` object\nwill vary depending on this value.\n\nThere are a large number of possible values, examples are\n* `Error` for a request that couldn't be completed,\n* `RequestAccepted` for an incoming request (e.g. via HTTP),\n* `RequestStatusUpdate` for a later update about a request which was\n  logged earlier,\n* `Provision` for resource provisionings running in the background or \n* `DCDUserEvent` for events about a DCD user.\n"}}}}}}}}}}}}}},"paths":{"/activitylog/v1/contracts/{contractNumber}":{"get":{"tags":["Contracts"],"summary":"Download Activity Log entries.","description":"This operation returns the actual activity log data related to the specific **contractNumber** supplied in the request. The amount of data returned can be limited by providing one or both of the optional **dateStart** and **dateEnd** parameters.\n\n\n  If valid values for both **dateStart** and **dateEnd** are supplied, then\nthe activity log information for the date range specified will be returned. Omitting either **dateStart** or **dateEnd** will return all entries available after **dateStart** or before **dateEnd**.\n\n  For pagination use the **offset** and **limit** parameters.\n","operationId":"getByContract","parameters":[{"name":"contractNumber","in":"path","description":"Contract number thats activity log entires should be downloaded.","required":true,"schema":{"type":"integer"}},{"name":"dateStart","in":"query","description":"Start date for the Activity Log entries (inclusive) (e.g. '2021-09-23T11:43:51Z' or '2016-07-01')","required":false,"schema":{"type":"string"}},{"name":"dateEnd","in":"query","description":"End date for the Activity Log entries (exclusive) (e.g. '2021-09-27T10:31:15Z' or '2016-07-30')","required":false,"schema":{"type":"string"}},{"name":"offset","in":"query","description":"Page index ( the number of hits to skip )","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"limit","in":"query","description":"Page size ( the maximum number of hits to return )","required":false,"schema":{"maximum":10000,"minimum":1,"type":"integer","default":20}}],"responses":{"200":{"description":"Downloading activity log entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetByContractResponse"}}}},"400":{"description":"Bad Request. Returned for a malformed **dateStart** or **dateEnd**, a **dateStart** later than **dateEnd**, an unknown query parameter, or an **offset** or **limit** outside the documented bounds."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}}}}
```


---

# 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/api-reference/observability/activity-log/contracts/download-activity-log-entries.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.
