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
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: [email protected]:password.
Token Authentication: Provide a header value as Bearer followed by your token.
The API may return different error codes depending on the issue encountered. Some common error codes include:
The following example demonstrates how to download activity log entries for a contract with ID 12345678:
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
BearerMake a GET request to: https://api.ionos.com/activitylog/v1/contracts/12345678.
Response: The response will be a JSON object containing the activity log entries for the specified contract.
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.
Activity Log
Retrieve a list of activities performed in your contract within IONOS Cloud.
This operation retrieves general information about the API, such as the name and version.
Use the following endpoint to display the API information: https://api.ionos.com/activitylog/v1.
To make authenticated requests to the API, the following fields are mandatory in the request header:
A 200 Successful operation response displays the API details.
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 Authentication API for Tokens.
Use the following endpoint to retrieve a list of contracts: https://api.ionos.com/activitylog/v1/contracts.
To make authenticated requests to the API, the following fields are mandatory in the request header:
A 200 Successful operation lists all the contracts.
Authorization
yes
string
You can use Basic Authentication or a Bearer token. For more information, see Authentication.
Content-Type
yes
string
Set this to application/json.
Authorization
yes
string
You can use Basic Authentication or a Bearer token. For more information, see Authentication.
Content-Type
yes
string
Set this to application/json.
curl -X 'GET' \
'https://api.ionos.com/activitylog/v1' \
-H 'accept: application/json'{
"href": "string",
"name": "CLOUD API",
"version": "1.0"
}curl -X 'GET' \
'https://api.ionos.com/activitylog/v1/contracts' \
-H 'accept: application/json'[
{
"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"
}
]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.
Use the following endpoint to retrieve the activity log entries: https://api.ionos.com/activitylog/v1/contracts/{contractNumber}.
To make authenticated requests to the API, the following path parameter is mandatory:
To make authenticated requests to the API, the following fields are mandatory in the request header:
A 200 Successful operation indicates that the activity logs are being downloaded for the specified contract number.
Authorization
yes
string
You can use Basic Authentication or a Bearer token. For more information, see .
Content-Type
yes
string
Set this to application/json.
contractNumber
yes
integer
Contract number for which the activity log entries must be downloaded.
curl -X 'GET' \
'https://api.ionos.com/activitylog/v1/contracts/9876543218374837483?offset=0&limit=20' \
-H 'accept: application/json'{
"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": "[email protected]"
},
"sourceService": "ExampleService"
},
"event": {
"param": {},
"resources": [
{
"action": [
"sec.user.create"
],
"id": "1466",
"type": "user"
}
],
"type": "RequestAccepted"
}
}
}
]
}
}