# Web Cloud › Web Hosting › Statistics and logs API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Web Cloud product's sections: https://developers.eu.ovhcloud.com/reference/web-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 16 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/web-cloud/web-hosting/statistics-and-logs/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/web-hosting/statistics-and-logs.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/web-hosting/statistics-and-logs.json?format=openapi3

## Operations

- `GET /hosting/web/{serviceName}/ownLogs` — List own logs
- `GET /hosting/web/{serviceName}/ownLogs/{id}` — Get own logs
- `GET /hosting/web/{serviceName}/ownLogs/{id}/userLogs` — List log users
- `GET /hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}` — Get a log user
- `GET /hosting/web/{serviceName}/statistics` — Get statistics
- `GET /hosting/web/{serviceName}/userLogs` — List log users
- `GET /hosting/web/{serviceName}/userLogs/{login}` — Get a log user
- `GET /hosting/web/{serviceName}/userLogsToken` — Get a logs interface token
- `POST /hosting/web/{serviceName}/ownLogs/{id}/userLogs` — Create a log user
- `POST /hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}/changePassword` — Change a log user password
- `POST /hosting/web/{serviceName}/userLogs` — Create a log user
- `POST /hosting/web/{serviceName}/userLogs/{login}/changePassword` — Change a log user password
- `DELETE /hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}` — Delete a log user
- `DELETE /hosting/web/{serviceName}/userLogs/{login}` — Delete a log user
- `PUT /hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}` — Update a log user
- `PUT /hosting/web/{serviceName}/userLogs/{login}` — Update a log user

## List own logs

`GET /1.0/hosting/web/{serviceName}/ownLogs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#get-hosting-web-servicename-ownlogs

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ownLogs/get`

List own logs. Returns the IDs of the own logs of the hosting, which separate the logs and statistics of a domain. Filter them by FQDN.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `fqdn` | query | string |  | Filter the value of fqdn property (like) |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ownLogs" \
  -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("/hosting/web/{serviceName}/ownLogs")

# 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("/hosting/web/{serviceName}/ownLogs");

print_r($result);
?>
```

## Get own logs

`GET /1.0/hosting/web/{serviceName}/ownLogs/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#get-hosting-web-servicename-ownlogs-id

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ownLogs/get`

Get own logs. Returns the FQDN, logs URL, statistics URL and status of the own logs, which separate the logs and statistics of a domain.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.ownLogs | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fqdn` | string | read-only | The ownlogs fqdn available on logs.clusterXX.hosting.ovh.net |
| `id` | integer | read-only | Identifier of this ownLogs |
| `logs` | string | read-only | URL to access this ownLogs logs |
| `stats` | string | read-only | URL to access this ownLogs stats |
| `status` | hosting.web.ownLogs.StatusEnum | read-only | Status of this ownLogs — one of `created`, `creating`, `deleting` |
| `taskId` | integer | read-only | The task ID working on this ownLogs |

```json
{
  "fqdn": "string",
  "id": 0,
  "logs": "string",
  "stats": "string",
  "status": "created",
  "taskId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ownLogs/{id}" \
  -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("/hosting/web/{serviceName}/ownLogs/{id}")

# 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("/hosting/web/{serviceName}/ownLogs/{id}");

print_r($result);
?>
```

## List log users

`GET /1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#get-hosting-web-servicename-ownlogs-id-userlogs

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ownLogs/userLogs/get`

List log users. Returns the logins of the users allowed to access the logs interface. Filter them by login.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | query | string |  | Filter the value of login property (like) |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs" \
  -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("/hosting/web/{serviceName}/ownLogs/{id}/userLogs")

# 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("/hosting/web/{serviceName}/ownLogs/{id}/userLogs");

print_r($result);
?>
```

## Get a log user

`GET /1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#get-hosting-web-servicename-ownlogs-id-userlogs-login

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ownLogs/userLogs/get`

Get a log user. Returns the login, description, status and creation date of the log user, and the own logs it can access.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The userLogs login used to connect to logs.ovh.net |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.userLogs | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Date of the user creation |
| `description` | string |  | Description field for you |
| `login` | string | read-only | The userLogs login used to connect to logs.ovh.net |
| `ownLogsId` | integer | read-only | OwnLogs where this userLogs will be enable. Default : main domain ownlogs |
| `status` | hosting.web.userLogs.StatusEnum | read-only | Status of this userLogs — one of `created`, `creating`, `deleting`, `updating` |
| `taskId` | integer | read-only | The task ID working on this userLogs |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "description": "string",
  "login": "string",
  "ownLogsId": 0,
  "status": "created",
  "taskId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}" \
  -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("/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}")

# 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("/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}");

print_r($result);
?>
```

## Get statistics

`GET /1.0/hosting/web/{serviceName}/statistics`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#get-hosting-web-servicename-statistics

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:statistics/get`

Get statistics. Returns one statistic of the hosting over a period: HTTP hits, mean response time, FTP commands, outgoing TCP connections, CPU usage or worker overload.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `period` | query | hosting.web.StatisticsPeriodEnum | yes | Available periods for statistics — one of `daily`, `monthly`, `weekly`, `yearly` |
| `serviceName` | path | string | yes | The internal name of your hosting |
| `type` | query | hosting.web.StatisticsTypeEnum | yes | Types of statistics available for the web hosting — one of `in.ftpCommands`, `in.httpHits`, `in.httpMeanResponseTime`, `out.tcpConn`, `sys.cpuUsage`, `sys.workerSpawnOverload` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | complexType.ChartSerie_complexType.ChartTimestampValue[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `serieName` | string |  |  |
| `unit` | string |  |  |
| `values` | complexType.ChartTimestampValue[] |  |  |
| `values[].timestamp` | integer |  |  |
| `values[].value` | number |  |  |

```json
[
  {
    "serieName": "string",
    "unit": "string",
    "values": [
      {
        "timestamp": 0,
        "value": 0
      }
    ]
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/statistics" \
  -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("/hosting/web/{serviceName}/statistics")

# 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("/hosting/web/{serviceName}/statistics");

print_r($result);
?>
```

## List log users

`GET /1.0/hosting/web/{serviceName}/userLogs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#get-hosting-web-servicename-userlogs

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-11-03, removed on 2024-03-01; use `/hosting/web/{serviceName}/ownLogs/{id}/userLogs` instead.  
**IAM actions:** `webHosting:apiovh:userLogs/get`

List log users. Returns the logins of the users allowed to access the logs interface. Filter them by login.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | query | string |  | Filter the value of login property (like) |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/userLogs" \
  -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("/hosting/web/{serviceName}/userLogs")

# 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("/hosting/web/{serviceName}/userLogs");

print_r($result);
?>
```

## Get a log user

`GET /1.0/hosting/web/{serviceName}/userLogs/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#get-hosting-web-servicename-userlogs-login

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-11-03, removed on 2024-03-01; use `/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}` instead.  
**IAM actions:** `webHosting:apiovh:userLogs/get`

Get a log user. Returns the login, description, status and creation date of the log user, and the own logs it can access.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The userLogs login used to connect to logs.ovh.net |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | hosting.web.userLogs | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Date of the user creation |
| `description` | string |  | Description field for you |
| `login` | string | read-only | The userLogs login used to connect to logs.ovh.net |
| `ownLogsId` | integer | read-only | OwnLogs where this userLogs will be enable. Default : main domain ownlogs |
| `status` | hosting.web.userLogs.StatusEnum | read-only | Status of this userLogs — one of `created`, `creating`, `deleting`, `updating` |
| `taskId` | integer | read-only | The task ID working on this userLogs |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "description": "string",
  "login": "string",
  "ownLogsId": 0,
  "status": "created",
  "taskId": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/userLogs/{login}" \
  -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("/hosting/web/{serviceName}/userLogs/{login}")

# 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("/hosting/web/{serviceName}/userLogs/{login}");

print_r($result);
?>
```

## Get a logs interface token

`GET /1.0/hosting/web/{serviceName}/userLogsToken`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#get-hosting-web-servicename-userlogstoken

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:userLogsToken/get`

Get a logs interface token. Returns a temporary token to access the logs interface. Set its lifetime in seconds with ttl, its scope with attachedDomain, and remoteCheck to limit it to the caller IP.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `attachedDomain` | query | string |  | Specific attached domain to be included in the scope of your token |
| `remoteCheck` | query | boolean |  | Whether to limit the use of the token to the remote IPv4 of API caller |
| `serviceName` | path | string | yes | The internal name of your hosting |
| `ttl` | query | integer |  | Expiration of your token (in seconds) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string (password) | successful operation |

```json
"string"
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/userLogsToken" \
  -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("/hosting/web/{serviceName}/userLogsToken")

# 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("/hosting/web/{serviceName}/userLogsToken");

print_r($result);
?>
```

## Create a log user

`POST /1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#post-hosting-web-servicename-ownlogs-id-userlogs

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ownLogs/userLogs/create`

Create a log user. Creates a user allowed to access the logs interface. Without ownLogsId, the user accesses the logs of the main domain.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string | yes | Description field for you |
| `login` | string | yes | The userLogs login used to connect to logs.ovh.net |
| `ownLogsId` | integer |  | OwnLogs where this userLogs will be enable. Default : main domain ownlogs |
| `password` | string (password) | yes | The new userLogs password |

```json
{
  "description": "string",
  "login": "string",
  "ownLogsId": 0,
  "password": "string"
}
```

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs" \
  -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
)

result = client.post("/hosting/web/{serviceName}/ownLogs/{id}/userLogs",
	description = None, # Description field for you (type: string)
	login = None, # The userLogs login used to connect to logs.ovh.net (type: string)
	ownLogsId = None, # OwnLogs where this userLogs will be enable. Default : main domain ownlogs (type: long, nullable)
	password = None, # The new userLogs password (type: password)
)

# 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->post("/hosting/web/{serviceName}/ownLogs/{id}/userLogs", array(
	description => null, // Description field for you (type: string)
	login => null, // The userLogs login used to connect to logs.ovh.net (type: string)
	ownLogsId => null, // OwnLogs where this userLogs will be enable. Default : main domain ownlogs (type: long, nullable)
	password => null, // The new userLogs password (type: password)
));

print_r($result);
?>
```

## Change a log user password

`POST /1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}/changePassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#post-hosting-web-servicename-ownlogs-id-userlogs-login-changepassword

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ownLogs/userLogs/changePassword`

Change a log user password. Changes the password the log user enters to access the logs interface at logs.ovh.net.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The userLogs login used to connect to logs.ovh.net |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) | yes | The new userLogs password |

```json
{
  "password": "string"
}
```

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}/changePassword" \
  -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: password
result = client.post("/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}/changePassword",
	password = None, # The new userLogs password (type: password)
)

# 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: password
$result = $ovh->post("/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}/changePassword", array(
	password => null, // The new userLogs password (type: password)
));

print_r($result);
?>
```

## Create a log user

`POST /1.0/hosting/web/{serviceName}/userLogs`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#post-hosting-web-servicename-userlogs

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-11-03, removed on 2024-03-01; use `/hosting/web/{serviceName}/ownLogs/{id}/userLogs` instead.  
**IAM actions:** `webHosting:apiovh:userLogs/create`

Create a log user. Creates a user allowed to access the logs interface. Without ownLogsId, the user accesses the logs of the main domain.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string | yes | Description field for you |
| `login` | string | yes | The userLogs login used to connect to logs.ovh.net |
| `ownLogsId` | integer |  | OwnLogs where this userLogs will be enable. Default : main domain ownlogs |
| `password` | string (password) | yes | The new userLogs password |

```json
{
  "description": "string",
  "login": "string",
  "ownLogsId": 0,
  "password": "string"
}
```

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/userLogs" \
  -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
)

result = client.post("/hosting/web/{serviceName}/userLogs",
	description = None, # Description field for you (type: string)
	login = None, # The userLogs login used to connect to logs.ovh.net (type: string)
	ownLogsId = None, # OwnLogs where this userLogs will be enable. Default : main domain ownlogs (type: long, nullable)
	password = None, # The new userLogs password (type: password)
)

# 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->post("/hosting/web/{serviceName}/userLogs", array(
	description => null, // Description field for you (type: string)
	login => null, // The userLogs login used to connect to logs.ovh.net (type: string)
	ownLogsId => null, // OwnLogs where this userLogs will be enable. Default : main domain ownlogs (type: long, nullable)
	password => null, // The new userLogs password (type: password)
));

print_r($result);
?>
```

## Change a log user password

`POST /1.0/hosting/web/{serviceName}/userLogs/{login}/changePassword`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#post-hosting-web-servicename-userlogs-login-changepassword

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-11-03, removed on 2024-03-01; use `/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}` instead.  
**IAM actions:** `webHosting:apiovh:userLogs/changePassword`

Change a log user password. Changes the password the log user enters to access the logs interface at logs.ovh.net.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The userLogs login used to connect to logs.ovh.net |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) | yes | The new userLogs password |

```json
{
  "password": "string"
}
```

### Responses

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

```json
"string"
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/userLogs/{login}/changePassword" \
  -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: password
result = client.post("/hosting/web/{serviceName}/userLogs/{login}/changePassword",
	password = None, # The new userLogs password (type: password)
)

# 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: password
$result = $ovh->post("/hosting/web/{serviceName}/userLogs/{login}/changePassword", array(
	password => null, // The new userLogs password (type: password)
));

print_r($result);
?>
```

## Delete a log user

`DELETE /1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#delete-hosting-web-servicename-ownlogs-id-userlogs-login

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ownLogs/userLogs/delete`

Delete a log user. Deletes the log user, who can no longer access the logs interface at logs.ovh.net with its login.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The userLogs login used to connect to logs.ovh.net |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

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

```json
"string"
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}" \
  -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("/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}")

# 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("/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}");

print_r($result);
?>
```

## Delete a log user

`DELETE /1.0/hosting/web/{serviceName}/userLogs/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#delete-hosting-web-servicename-userlogs-login

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-11-03, removed on 2024-03-01; use `/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}` instead.  
**IAM actions:** `webHosting:apiovh:userLogs/delete`

Delete a log user. Deletes the log user, who can no longer access the logs interface at logs.ovh.net with its login.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The userLogs login used to connect to logs.ovh.net |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Responses

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

```json
"string"
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/userLogs/{login}" \
  -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("/hosting/web/{serviceName}/userLogs/{login}")

# 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("/hosting/web/{serviceName}/userLogs/{login}");

print_r($result);
?>
```

## Update a log user

`PUT /1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#put-hosting-web-servicename-ownlogs-id-userlogs-login

**Status:** Stable production version  
**IAM actions:** `webHosting:apiovh:ownLogs/userLogs/edit`

Update a log user. Updates the description of the log user. The login and the own logs it can access cannot be changed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of the object |
| `login` | path | string | yes | The userLogs login used to connect to logs.ovh.net |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `hosting.web.userLogs`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Date of the user creation |
| `description` | string |  | Description field for you |
| `login` | string | read-only | The userLogs login used to connect to logs.ovh.net |
| `ownLogsId` | integer | read-only | OwnLogs where this userLogs will be enable. Default : main domain ownlogs |
| `status` | hosting.web.userLogs.StatusEnum | read-only | Status of this userLogs — one of `created`, `creating`, `deleting`, `updating` |
| `taskId` | integer | read-only | The task ID working on this userLogs |

```json
{
  "description": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}" \
  -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: hosting.web.userLogs
result = client.put("/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}",
	description = None, # Description field for you (type: string, nullable)
)

# 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: hosting.web.userLogs
$result = $ovh->put("/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}", array(
	description => null, // Description field for you (type: string, nullable)
));

print_r($result);
?>
```

## Update a log user

`PUT /1.0/hosting/web/{serviceName}/userLogs/{login}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/web-hosting/statistics-and-logs/#put-hosting-web-servicename-userlogs-login

**Status:** Deprecated, will be removed  
**Deprecated** since 2023-11-03, removed on 2024-03-01; use `/hosting/web/{serviceName}/ownLogs/{id}/userLogs/{login}` instead.  
**IAM actions:** `webHosting:apiovh:userLogs/edit`

Update a log user. Updates the description of the log user. The login and the own logs it can access cannot be changed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `login` | path | string | yes | The userLogs login used to connect to logs.ovh.net |
| `serviceName` | path | string | yes | The internal name of your hosting |

### Request body (required)

Type: `hosting.web.userLogs`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only | Date of the user creation |
| `description` | string |  | Description field for you |
| `login` | string | read-only | The userLogs login used to connect to logs.ovh.net |
| `ownLogsId` | integer | read-only | OwnLogs where this userLogs will be enable. Default : main domain ownlogs |
| `status` | hosting.web.userLogs.StatusEnum | read-only | Status of this userLogs — one of `created`, `creating`, `deleting`, `updating` |
| `taskId` | integer | read-only | The task ID working on this userLogs |

```json
{
  "description": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/userLogs/{login}" \
  -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: hosting.web.userLogs
result = client.put("/hosting/web/{serviceName}/userLogs/{login}",
	description = None, # Description field for you (type: string, nullable)
)

# 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: hosting.web.userLogs
$result = $ovh->put("/hosting/web/{serviceName}/userLogs/{login}", array(
	description => null, // Description field for you (type: string, nullable)
));

print_r($result);
?>
```
