# Manage & Operate › Identity & Access Management › Account Logs › Audit Logs API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Manage & Operate product's sections: https://developers.eu.ovhcloud.com/reference/manage-operate/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 8 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/account-logs/audit-logs/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/manage-operate/identity-access-management/account-logs/audit-logs.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/manage-operate/identity-access-management/account-logs/audit-logs.json?format=openapi3

## Operations

- `GET /me/logs/audit` — Get your audit logs
- `GET /me/logs/audit/log/kind` — List available log kinds
- `GET /me/logs/audit/log/kind/{name}` — Get a log kind
- `GET /me/logs/audit/log/subscription` — List subscription IDs for a cluster
- `POST /me/logs/audit/log/subscription` — Create a subscription from logs to a pre-existing LDP stream
- `GET /me/logs/audit/log/subscription/{subscriptionId}` — Get subscription details
- `DELETE /me/logs/audit/log/subscription/{subscriptionId}` — Delete a subscription
- `POST /me/logs/audit/log/url` — Generate a temporary URL to retrieve logs

## Get your audit logs

`GET /1.0/me/logs/audit`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/account-logs/audit-logs/#get-me-logs-audit

**Status:** Alpha version  
**IAM actions:** `account:apiovh:me/logs/audit/get`

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | audit.Log[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authDetails` | audit.LogAuthDetails | read-only | authentication details |
| `authDetails.userDetails` | audit.LogAuthUserDetails | read-only | authenticated user details |
| `authDetails.userDetails.type` | audit.LogAuthUserTypeEnum | read-only | authentication type — one of `ACCOUNT`, `PROVIDER`, `USER` |
| `authDetails.userDetails.user` | string | read-only | authenticated user name |
| `createdAt` | string (date-time) | read-only | event's date |
| `groupCreatedDetails` | audit.LogGroupCreatedDetails | read-only | specific fields for GROUP_CREATED events |
| `groupCreatedDetails.group` | string | read-only | Identifier of the group |
| `groupCreatedDetails.new` | audit.LogGroupDetails | read-only | Group details after creation |
| `groupCreatedDetails.new.description` | string | read-only | Description of the group |
| `groupCreatedDetails.new.name` | string | read-only | Name of the group |
| `groupCreatedDetails.new.role` | string | read-only | Role of the group |
| `groupDeletedDetails` | audit.LogGroupDeletedDetails | read-only | specific fields for GROUP_DELETED events |
| `groupDeletedDetails.group` | string | read-only | Identifier of the group |
| `groupDeletedDetails.old` | audit.LogGroupDetails | read-only | Group details before deletion |
| `groupDeletedDetails.old.description` | string | read-only | Description of the group |
| `groupDeletedDetails.old.name` | string | read-only | Name of the group |
| `groupDeletedDetails.old.role` | string | read-only | Role of the group |
| `groupModifiedDetails` | audit.LogGroupModifiedDetails | read-only | specific fields for GROUP_MODIFIED events |
| `groupModifiedDetails.group` | string | read-only | Identifier of the group |
| `groupModifiedDetails.new` | audit.LogGroupDetails | read-only | Group details after update |
| `groupModifiedDetails.new.description` | string | read-only | Description of the group |
| `groupModifiedDetails.new.name` | string | read-only | Name of the group |
| `groupModifiedDetails.new.role` | string | read-only | Role of the group |
| `groupModifiedDetails.old` | audit.LogGroupDetails | read-only | Group details before update |
| `groupModifiedDetails.old.description` | string | read-only | Description of the group |
| `groupModifiedDetails.old.name` | string | read-only | Name of the group |
| `groupModifiedDetails.old.role` | string | read-only | Role of the group |
| `ip` | ip | read-only | IP associated to this event |
| `loginSuccessDetails` | audit.LogLoginSuccessDetails | read-only | specific fields for LOGIN_SUCCESS events |
| `loginSuccessDetails.mfaType` | audit.LogAuthMFATypeEnum | read-only | Used MFA while login — one of `BACKUP_CODE`, `MAIL`, `NONE`, `SMS`, `TOTP`, `U2F`, `UNKNOWN` |
| `loginSuccessDetails.userAgent` | string | read-only | Browser's user agent |
| `policyCreatedDetails` | audit.LogPolicyCreatedDetails | read-only | specific fields for POLICY_CREATED events |
| `policyCreatedDetails.added` | audit.LogPolicyChanges | read-only | Policy changes |
| `policyCreatedDetails.added.identities` | string[] | read-only | Identities changed on the policy |
| `policyCreatedDetails.added.resources` | string[] | read-only | Resources changed on the policy |
| `policyCreatedDetails.new` | audit.LogPolicyDetails | read-only | Policy details after creation |
| `policyCreatedDetails.new.description` | string | read-only | Description of the policy |
| `policyCreatedDetails.new.name` | string | read-only | Name of the policy |
| `policyCreatedDetails.policyId` | string (uuid) | read-only | Id of the policy |
| `policyCreatedDetails.policyName` | string | read-only | Name of the policy |
| `policyDeletedDetails` | audit.LogPolicyDeletedDetails | read-only | specific fields for POLICY_DELETED events |
| `policyDeletedDetails.old` | audit.LogPolicyDetails | read-only | Policy details before deletion |
| `policyDeletedDetails.old.description` | string | read-only | Description of the policy |
| `policyDeletedDetails.old.name` | string | read-only | Name of the policy |
| `policyDeletedDetails.policyId` | string (uuid) | read-only | Id of the policy |
| `policyDeletedDetails.policyName` | string | read-only | Name of the policy |
| `policyDeletedDetails.removed` | audit.LogPolicyChanges | read-only | Policy changes |
| `policyDeletedDetails.removed.identities` | string[] | read-only | Identities changed on the policy |
| `policyDeletedDetails.removed.resources` | string[] | read-only | Resources changed on the policy |
| `policyModifiedDetails` | audit.LogPolicyModifiedDetails | read-only | specific fields for POLICY_MODIFIED events |
| `policyModifiedDetails.added` | audit.LogPolicyChanges | read-only | Policy changes (addition) |
| `policyModifiedDetails.added.identities` | string[] | read-only | Identities changed on the policy |
| `policyModifiedDetails.added.resources` | string[] | read-only | Resources changed on the policy |
| `policyModifiedDetails.new` | audit.LogPolicyDetails | read-only | Policy details after update |
| `policyModifiedDetails.new.description` | string | read-only | Description of the policy |
| `policyModifiedDetails.new.name` | string | read-only | Name of the policy |
| `policyModifiedDetails.old` | audit.LogPolicyDetails | read-only | Policy details before update |
| `policyModifiedDetails.old.description` | string | read-only | Description of the policy |
| `policyModifiedDetails.old.name` | string | read-only | Name of the policy |
| `policyModifiedDetails.policyId` | string (uuid) | read-only | Id of the policy |
| `policyModifiedDetails.policyName` | string | read-only | Name of the policy |
| `policyModifiedDetails.removed` | audit.LogPolicyChanges | read-only | Policy changes (removal) |
| `policyModifiedDetails.removed.identities` | string[] | read-only | Identities changed on the policy |
| `policyModifiedDetails.removed.resources` | string[] | read-only | Resources changed on the policy |
| `providerCreatedDetails` | audit.LogProviderCreatedDetails | read-only | specific fields for PROVIDER_CREATED events |
| `providerCreatedDetails.new` | audit.LogProviderDetails | read-only | Provider details after creation |
| `providerCreatedDetails.new.groupAttributeName` | string | read-only | SAML group attribute name of the provider |
| `providerCreatedDetails.new.requestSignatureEnabled` | boolean | read-only | SAML request signature enabled |
| `providerCreatedDetails.new.userAttributeName` | string | read-only | SAML user attribute name of the provider |
| `providerCreatedDetails.new.usersDisabled` | boolean | read-only | Provider use disabled account users |
| `providerCreatedDetails.ssoServiceURL` | string | read-only | SSO URL of the provider |
| `providerDeletedDetails` | audit.LogProviderDeletedDetails | read-only | specific fields for PROVIDER_DELETED events |
| `providerDeletedDetails.old` | audit.LogProviderDetails | read-only | Provider details before deletion |
| `providerDeletedDetails.old.groupAttributeName` | string | read-only | SAML group attribute name of the provider |
| `providerDeletedDetails.old.requestSignatureEnabled` | boolean | read-only | SAML request signature enabled |
| `providerDeletedDetails.old.userAttributeName` | string | read-only | SAML user attribute name of the provider |
| `providerDeletedDetails.old.usersDisabled` | boolean | read-only | Provider use disabled account users |
| `providerDeletedDetails.ssoServiceURL` | string | read-only | SSO URL of the provider |
| `providerModifiedDetails` | audit.LogProviderModifiedDetails | read-only | specific fields for PROVIDER_MODIFIED events |
| `providerModifiedDetails.new` | audit.LogProviderDetails | read-only | Provider details after update |
| `providerModifiedDetails.new.groupAttributeName` | string | read-only | SAML group attribute name of the provider |
| `providerModifiedDetails.new.requestSignatureEnabled` | boolean | read-only | SAML request signature enabled |
| `providerModifiedDetails.new.userAttributeName` | string | read-only | SAML user attribute name of the provider |
| `providerModifiedDetails.new.usersDisabled` | boolean | read-only | Provider use disabled account users |
| `providerModifiedDetails.old` | audit.LogProviderDetails | read-only | Provider details before update |
| `providerModifiedDetails.old.groupAttributeName` | string | read-only | SAML group attribute name of the provider |
| `providerModifiedDetails.old.requestSignatureEnabled` | boolean | read-only | SAML request signature enabled |
| `providerModifiedDetails.old.userAttributeName` | string | read-only | SAML user attribute name of the provider |
| `providerModifiedDetails.old.usersDisabled` | boolean | read-only | Provider use disabled account users |
| `providerModifiedDetails.ssoServiceURL` | string | read-only | SSO URL of the provider |
| `resourceGroupCreatedDetails` | audit.LogResourceGroupCreatedDetails | read-only | specific fields for RESOURCE_GROUP_CREATED events |
| `resourceGroupCreatedDetails.added` | audit.LogResourceGroupChanges | read-only | Resource group changes |
| `resourceGroupCreatedDetails.added.resources` | string[] | read-only | Resources changed on the resource group |
| `resourceGroupCreatedDetails.new` | audit.LogResourceGroupDetails | read-only | Resource group details after creation |
| `resourceGroupCreatedDetails.new.name` | string | read-only | Name of the policy |
| `resourceGroupCreatedDetails.resourceGroupId` | string (uuid) | read-only | Id of the resource group |
| `resourceGroupCreatedDetails.resourceGroupName` | string | read-only | Name of the resource group |
| `resourceGroupDeletedDetails` | audit.LogResourceGroupDeletedDetails | read-only | specific fields for RESOURCE_GROUP_DELETED events |
| `resourceGroupDeletedDetails.old` | audit.LogResourceGroupDetails | read-only | Resource group details before deletion |
| `resourceGroupDeletedDetails.old.name` | string | read-only | Name of the policy |
| `resourceGroupDeletedDetails.removed` | audit.LogResourceGroupChanges | read-only | Resource group changes |
| `resourceGroupDeletedDetails.removed.resources` | string[] | read-only | Resources changed on the resource group |
| `resourceGroupDeletedDetails.resourceGroupId` | string (uuid) | read-only | Id of the resource group |
| `resourceGroupDeletedDetails.resourceGroupName` | string | read-only | Name of the resource group |
| `resourceGroupModifiedDetails` | audit.LogResourceGroupModifiedDetails | read-only | specific fields for RESOURCE_GROUP_MODIFIED events |
| `resourceGroupModifiedDetails.added` | audit.LogResourceGroupChanges | read-only | Resource group changes (addition) |
| `resourceGroupModifiedDetails.added.resources` | string[] | read-only | Resources changed on the resource group |
| `resourceGroupModifiedDetails.new` | audit.LogResourceGroupDetails | read-only | Resource group details after update |
| `resourceGroupModifiedDetails.new.name` | string | read-only | Name of the policy |
| `resourceGroupModifiedDetails.old` | audit.LogResourceGroupDetails | read-only | Resource group details before update |
| `resourceGroupModifiedDetails.old.name` | string | read-only | Name of the policy |
| `resourceGroupModifiedDetails.removed` | audit.LogResourceGroupChanges | read-only | Resource group changes (removal) |
| `resourceGroupModifiedDetails.removed.resources` | string[] | read-only | Resources changed on the resource group |
| `resourceGroupModifiedDetails.resourceGroupId` | string (uuid) | read-only | Id of the resource group |
| `resourceGroupModifiedDetails.resourceGroupName` | string | read-only | Name of the resource group |
| `tokenCreatedDetails` | audit.LogTokenCreatedDetails | read-only | specific fields for TOKEN_CREATED events |
| `tokenCreatedDetails.new` | audit.LogTokenDetails | read-only | Token details after creation |
| `tokenCreatedDetails.new.description` | string | read-only | Description of the token |
| `tokenCreatedDetails.new.expiresAt` | string (date-time) | read-only | Token's expiration date |
| `tokenCreatedDetails.tokenCreatedAt` | string (date-time) | read-only | Token's creation date |
| `tokenCreatedDetails.tokenName` | string | read-only | Name of the token |
| `tokenCreatedDetails.user` | string | read-only | Login of the user |
| `tokenDeletedDetails` | audit.LogTokenDeletedDetails | read-only | specific fields for TOKEN_DELETED events |
| `tokenDeletedDetails.old` | audit.LogTokenDetails | read-only | Token details before deletion |
| `tokenDeletedDetails.old.description` | string | read-only | Description of the token |
| `tokenDeletedDetails.old.expiresAt` | string (date-time) | read-only | Token's expiration date |
| `tokenDeletedDetails.tokenCreatedAt` | string (date-time) | read-only | Token's creation date |
| `tokenDeletedDetails.tokenName` | string | read-only | Name of the token |
| `tokenDeletedDetails.user` | string | read-only | Login of the user |
| `tokenModifiedDetails` | audit.LogTokenModifiedDetails | read-only | specific fields for TOKEN_MODIFIED events |
| `tokenModifiedDetails.new` | audit.LogTokenDetails | read-only | Token details after update |
| `tokenModifiedDetails.new.description` | string | read-only | Description of the token |
| `tokenModifiedDetails.new.expiresAt` | string (date-time) | read-only | Token's expiration date |
| `tokenModifiedDetails.old` | audit.LogTokenDetails | read-only | Token details before update |
| `tokenModifiedDetails.old.description` | string | read-only | Description of the token |
| `tokenModifiedDetails.old.expiresAt` | string (date-time) | read-only | Token's expiration date |
| `tokenModifiedDetails.tokenCreatedAt` | string (date-time) | read-only | Token's creation date |
| `tokenModifiedDetails.tokenName` | string | read-only | Name of the token |
| `tokenModifiedDetails.user` | string | read-only | Login of the user |
| `type` | audit.LogTypeEnum | read-only | type of event — one of `ACCOUNT_PASSWORD_CHANGED`, `GROUP_CREATED`, `GROUP_DELETED`, `GROUP_MODIFIED`, `LOGIN_SUCCESS`, `POLICY_CREATED`, `POLICY_DELETED`, `POLICY_MODIFIED`, `PROVIDER_CREATED`, `PROVIDER_DELETED`, `PROVIDER_MODIFIED`, `RESOURCE_GROUP_CREATED`, … |
| `userCreatedDetails` | audit.LogUserCreatedDetails | read-only | specific fields for USER_CREATED events |
| `userCreatedDetails.new` | audit.LogUserDetails | read-only | User details after creation |
| `userCreatedDetails.new.description` | string | read-only | Description of the user |
| `userCreatedDetails.new.group` | string | read-only | Group of the user |
| `userCreatedDetails.new.passwordRecoveryEmail` | string | read-only | Email of the user |
| `userCreatedDetails.new.userType` | auth.UserTypeEnum | read-only | Type of user created — one of `ROOT`, `SERVICE`, `USER` |
| `userCreatedDetails.user` | string | read-only | Login of the user |
| `userCreatedDetails.userCreatedAt` | string (date-time) | read-only | User's creation date |
| `userCreatedDetails.userType` | auth.UserTypeEnum | read-only | Type of user created — one of `ROOT`, `SERVICE`, `USER` |
| `userDeletedDetails` | audit.LogUserDeletedDetails | read-only | specific fields for USER_DELETED events |
| `userDeletedDetails.old` | audit.LogUserDetails | read-only | User details before deletion |
| `userDeletedDetails.old.description` | string | read-only | Description of the user |
| `userDeletedDetails.old.group` | string | read-only | Group of the user |
| `userDeletedDetails.old.passwordRecoveryEmail` | string | read-only | Email of the user |
| `userDeletedDetails.old.userType` | auth.UserTypeEnum | read-only | Type of user created — one of `ROOT`, `SERVICE`, `USER` |
| `userDeletedDetails.user` | string | read-only | Login of the user |
| `userDeletedDetails.userCreatedAt` | string (date-time) | read-only | User's creation date |
| `userDeletedDetails.userType` | auth.UserTypeEnum | read-only | Type of user created — one of `ROOT`, `SERVICE`, `USER` |
| `userModifiedDetails` | audit.LogUserModifiedDetails | read-only | specific fields for USER_MODIFIED events |
| `userModifiedDetails.new` | audit.LogUserDetails | read-only | User details after update |
| `userModifiedDetails.new.description` | string | read-only | Description of the user |
| `userModifiedDetails.new.group` | string | read-only | Group of the user |
| `userModifiedDetails.new.passwordRecoveryEmail` | string | read-only | Email of the user |
| `userModifiedDetails.new.userType` | auth.UserTypeEnum | read-only | Type of user created — one of `ROOT`, `SERVICE`, `USER` |
| `userModifiedDetails.old` | audit.LogUserDetails | read-only | User details before update |
| `userModifiedDetails.old.description` | string | read-only | Description of the user |
| `userModifiedDetails.old.group` | string | read-only | Group of the user |
| `userModifiedDetails.old.passwordRecoveryEmail` | string | read-only | Email of the user |
| `userModifiedDetails.old.userType` | auth.UserTypeEnum | read-only | Type of user created — one of `ROOT`, `SERVICE`, `USER` |
| `userModifiedDetails.user` | string | read-only | Login of the user |
| `userModifiedDetails.userCreatedAt` | string (date-time) | read-only | User's creation date |
| `userPasswordChangedDetails` | audit.LogUserPasswordChangedDetails | read-only | specific fields for USER_PASSWORD_CHANGED events |
| `userPasswordChangedDetails.user` | string | read-only | User name |
| `userPasswordChangedDetails.userCreatedAt` | string (date-time) | read-only | User's creation date |

```json
[
  {
    "authDetails": {
      "userDetails": {
        "type": "ACCOUNT",
        "user": "string"
      }
    },
    "createdAt": "2024-01-01T12:00:00Z",
    "groupCreatedDetails": {
      "group": "string",
      "new": {
        "description": "string",
        "name": "string",
        "role": "string"
      }
    },
    "groupDeletedDetails": {
      "group": "string",
      "old": {
        "description": "string",
        "name": "string",
        "role": "string"
      }
    },
    "groupModifiedDetails": {
      "group": "string",
      "new": {
        "description": "string",
        "name": "string",
        "role": "string"
      },
      "old": {
        "description": "string",
        "name": "string",
        "role": "string"
      }
    },
    "ip": "192.0.2.0",
    "loginSuccessDetails": {
      "mfaType": "BACKUP_CODE",
      "userAgent": "string"
    },
    "policyCreatedDetails": {
      "added": {
        "identities": [
          "string"
        ],
        "resources": [
          "string"
        ]
      },
      "new": {
        "description": "string",
        "name": "string"
      },
      "policyId": "00000000-0000-0000-0000-000000000000",
      "policyName": "string"
    },
    "policyDeletedDetails": {
      "old": {
        "description": "string",
        "name": "string"
      },
      "policyId": "00000000-0000-0000-0000-000000000000",
      "policyName": "string",
      "removed": {
        "identities": [
          "string"
        ],
        "resources": [
          "string"
        ]
      }
    },
    "policyModifiedDetails": {
  …
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/logs/audit" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/logs/audit")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/logs/audit");

print_r($result);
?>
```

## List available log kinds

`GET /1.0/me/logs/audit/log/kind`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/account-logs/audit-logs/#get-me-logs-audit-log-kind

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/logs/audit/log/kind/get`

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string[] | successful operation |

```json
[
  "string"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/logs/audit/log/kind" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/logs/audit/log/kind")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/logs/audit/log/kind");

print_r($result);
?>
```

## Get a log kind

`GET /1.0/me/logs/audit/log/kind/{name}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/account-logs/audit-logs/#get-me-logs-audit-log-kind-name

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/logs/audit/log/kind/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | path | string | yes | Name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.LogKind | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalReturnedFields` | string[] | read-only | List of additional log fields managed in this log kind |
| `createdAt` | string (date-time) | read-only | Creation date of the log kind |
| `displayName` | string | read-only | Log kind display name |
| `kindId` | string (uuid) | read-only | Log kind ID |
| `name` | string | read-only | Log kind name |
| `updatedAt` | string (date-time) | read-only | Last update date of the log kind |

```json
{
  "additionalReturnedFields": [
    "string"
  ],
  "createdAt": "2024-01-01T12:00:00Z",
  "displayName": "string",
  "kindId": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/logs/audit/log/kind/{name}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/logs/audit/log/kind/{name}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/logs/audit/log/kind/{name}");

print_r($result);
?>
```

## List subscription IDs for a cluster

`GET /1.0/me/logs/audit/log/subscription`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/account-logs/audit-logs/#get-me-logs-audit-log-subscription

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/logs/audit/log/subscription/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `kind` | query | string |  | Filter on a specific kind (e.g., audit) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string (uuid)[] | successful operation |

```json
[
  "00000000-0000-0000-0000-000000000000"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/logs/audit/log/subscription" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/logs/audit/log/subscription")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/logs/audit/log/subscription");

print_r($result);
?>
```

## Create a subscription from logs to a pre-existing LDP stream

`POST /1.0/me/logs/audit/log/subscription`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/account-logs/audit-logs/#post-me-logs-audit-log-subscription

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/logs/audit/log/subscription/create`, `ldp:apiovh:output/graylog/stream/forwardTo`

### Request body (required)

Type: `dbaas.logs.LogSubscriptionCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | string | yes | Log kind name to subscribe to |
| `streamId` | string (uuid) | yes | Customer log stream ID |

```json
{
  "kind": "string",
  "streamId": "00000000-0000-0000-0000-000000000000"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.LogSubscriptionResponse | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operationId` | string (uuid) | read-only | Identifier of the operation |
| `serviceName` | string | read-only | Operation owner's service name |

```json
{
  "operationId": "00000000-0000-0000-0000-000000000000",
  "serviceName": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/logs/audit/log/subscription" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: dbaas.logs.LogSubscriptionCreation
result = client.post("/me/logs/audit/log/subscription",
	kind = None, # Log kind name to subscribe to (type: string)
	streamId = None, # Customer log stream ID (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: dbaas.logs.LogSubscriptionCreation
$result = $ovh->post("/me/logs/audit/log/subscription", array(
	kind => null, // Log kind name to subscribe to (type: string)
	streamId => null, // Customer log stream ID (type: string)
));

print_r($result);
?>
```

## Get subscription details

`GET /1.0/me/logs/audit/log/subscription/{subscriptionId}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/account-logs/audit-logs/#get-me-logs-audit-log-subscription-subscriptionid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/logs/audit/log/subscription/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string (uuid) | yes | Subscription ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.LogSubscription | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the subscription |
| `kind` | string | read-only | Log kind name of this subscription |
| `resource` | dbaas.logs.SubscriptionResource | read-only | Subscribed resource, where the logs come from |
| `resource.name` | string | read-only | Name of subscribed resource |
| `resource.type` | string | read-only | Type of subscribed resource |
| `serviceName` | string | read-only | Name of the destination log service |
| `streamId` | string | read-only | Id of the destination log stream |
| `subscriptionId` | string (uuid) | read-only | Subscription ID |
| `updatedAt` | string (date-time) | read-only | Last update date of the subscription |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "kind": "string",
  "resource": {
    "name": "string",
    "type": "string"
  },
  "serviceName": "string",
  "streamId": "string",
  "subscriptionId": "00000000-0000-0000-0000-000000000000",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/me/logs/audit/log/subscription/{subscriptionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/me/logs/audit/log/subscription/{subscriptionId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/me/logs/audit/log/subscription/{subscriptionId}");

print_r($result);
?>
```

## Delete a subscription

`DELETE /1.0/me/logs/audit/log/subscription/{subscriptionId}`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/account-logs/audit-logs/#delete-me-logs-audit-log-subscription-subscriptionid

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/logs/audit/log/subscription/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | string (uuid) | yes | Subscription ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.LogSubscriptionResponse | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operationId` | string (uuid) | read-only | Identifier of the operation |
| `serviceName` | string | read-only | Operation owner's service name |

```json
{
  "operationId": "00000000-0000-0000-0000-000000000000",
  "serviceName": "string"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/me/logs/audit/log/subscription/{subscriptionId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/me/logs/audit/log/subscription/{subscriptionId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/me/logs/audit/log/subscription/{subscriptionId}");

print_r($result);
?>
```

## Generate a temporary URL to retrieve logs

`POST /1.0/me/logs/audit/log/url`

Link: https://developers.eu.ovhcloud.com/reference/manage-operate/identity-access-management/account-logs/audit-logs/#post-me-logs-audit-log-url

**Status:** Stable production version  
**IAM actions:** `account:apiovh:me/logs/audit/log/url/create`

### Request body (required)

Type: `dbaas.logs.LogUrlCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | string | yes | Log kind name |

```json
{
  "kind": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dbaas.logs.TemporaryLogsLink | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expirationDate` | string (date-time) | read-only | Temporary url expiration date |
| `url` | string | read-only | Temporary url |

```json
{
  "expirationDate": "2024-01-01T12:00:00Z",
  "url": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/me/logs/audit/log/url" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: dbaas.logs.LogUrlCreation
result = client.post("/me/logs/audit/log/url",
	kind = None, # Log kind name (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: dbaas.logs.LogUrlCreation
$result = $ovh->post("/me/logs/audit/log/url", array(
	kind => null, // Log kind name (type: string)
));

print_r($result);
?>
```
