# Public Cloud › Analytics › OpenSearch › Users API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Public Cloud product's sections: https://developers.eu.ovhcloud.com/reference/public-cloud/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/public-cloud/analytics/opensearch/users/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/public-cloud/analytics/opensearch/users.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/analytics/opensearch/users.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user` — List users
- `GET /publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}` — Get a user
- `POST /publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user` — Create a user
- `DELETE /publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}` — Delete a user
- `PUT /publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}` — Update a user
- `PATCH /publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}` — Partially update a user
- `GET /publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/permissions` — List user permissions
- `POST /publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}/resetPassword` — Reset the password of a user

## List users

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/opensearch/users/#get-publiccloud-project-projectid-managedanalytics-opensearch-serviceid-user

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:analytics/opensearch/user/get`

Returns the users of the service with their ACL entries and status. Passwords are not returned.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |
| `serviceId` | path | string (uuid) | yes | Service ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.database.opensearch.User[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acls` | publicCloud.database.opensearch.UserAcl[] | read-only | ACL entries granted to the user |
| `acls[].pattern` | string | yes | Index pattern this ACL applies to |
| `acls[].permission` | publicCloud.database.opensearch.AclPermissionEnum | yes | Permission granted on the matching indexes — one of `ADMIN`, `DENY`, `READ`, `READ_WRITE`, `WRITE` |
| `admin` | boolean | read-only | Whether this is the service administrator, the user created automatically at provisioning time, which cannot be deleted |
| `checksum` | string | read-only | Hash of the resource used for concurrency control |
| `createdAt` | string (date-time) | read-only | Date at which the user was created |
| `credentialsLastUpdatedAt` | string (date-time) | read-only | Date at which the user credentials were last updated |
| `id` | string (uuid) | read-only | Unique identifier of the user |
| `password` | string (password) | read-only | Password of the user. Returned only on creation or password reset. |
| `status` | publicCloud.database.UserStatusEnum | read-only | Current readiness status of the user — one of `CREATING`, `DELETING`, `ERROR`, `READY`, `UPDATING` |
| `username` | string | read-only | Login name of the user |

```json
[
  {
    "acls": [
      {
        "pattern": "string",
        "permission": "ADMIN"
      }
    ],
    "admin": true,
    "checksum": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "credentialsLastUpdatedAt": "2024-01-01T12:00:00Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "password": "string",
    "status": "CREATING",
    "username": "string"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user" \
  -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("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user")

# 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("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user");

print_r($result);
?>
```

## Get a user

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/opensearch/users/#get-publiccloud-project-projectid-managedanalytics-opensearch-serviceid-user-userid

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:analytics/opensearch/user/get`

Returns the user, its ACL entries and its status. The password is not returned.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `userId` | path | string (uuid) | yes | User ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.database.opensearch.User | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acls` | publicCloud.database.opensearch.UserAcl[] | read-only | ACL entries granted to the user |
| `acls[].pattern` | string | yes | Index pattern this ACL applies to |
| `acls[].permission` | publicCloud.database.opensearch.AclPermissionEnum | yes | Permission granted on the matching indexes — one of `ADMIN`, `DENY`, `READ`, `READ_WRITE`, `WRITE` |
| `admin` | boolean | read-only | Whether this is the service administrator, the user created automatically at provisioning time, which cannot be deleted |
| `checksum` | string | read-only | Hash of the resource used for concurrency control |
| `createdAt` | string (date-time) | read-only | Date at which the user was created |
| `credentialsLastUpdatedAt` | string (date-time) | read-only | Date at which the user credentials were last updated |
| `id` | string (uuid) | read-only | Unique identifier of the user |
| `password` | string (password) | read-only | Password of the user. Returned only on creation or password reset. |
| `status` | publicCloud.database.UserStatusEnum | read-only | Current readiness status of the user — one of `CREATING`, `DELETING`, `ERROR`, `READY`, `UPDATING` |
| `username` | string | read-only | Login name of the user |

```json
{
  "acls": [
    {
      "pattern": "string",
      "permission": "ADMIN"
    }
  ],
  "admin": true,
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "credentialsLastUpdatedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "password": "string",
  "status": "CREATING",
  "username": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}" \
  -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("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}")

# 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("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}");

print_r($result);
?>
```

## Create a user

`POST /v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/opensearch/users/#post-publiccloud-project-projectid-managedanalytics-opensearch-serviceid-user

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:analytics/opensearch/user/create`

Creates a user with ACL entries, each granting a permission on an index pattern. The generated password is returned only on creation and on password reset.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `serviceId` | path | string (uuid) | yes | Service ID |

### Request body (required)

Type: `publicCloud.database.opensearch.UserCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acls` | publicCloud.database.opensearch.UserAcl[] |  | ACL entries to grant to the user |
| `acls[].pattern` | string | yes | Index pattern this ACL applies to |
| `acls[].permission` | publicCloud.database.opensearch.AclPermissionEnum | yes | Permission granted on the matching indexes — one of `ADMIN`, `DENY`, `READ`, `READ_WRITE`, `WRITE` |
| `name` | string | yes | Login name of the new user |

```json
{
  "acls": [
    {
      "pattern": "string",
      "permission": "ADMIN"
    }
  ],
  "name": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.database.opensearch.User | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acls` | publicCloud.database.opensearch.UserAcl[] | read-only | ACL entries granted to the user |
| `acls[].pattern` | string | yes | Index pattern this ACL applies to |
| `acls[].permission` | publicCloud.database.opensearch.AclPermissionEnum | yes | Permission granted on the matching indexes — one of `ADMIN`, `DENY`, `READ`, `READ_WRITE`, `WRITE` |
| `admin` | boolean | read-only | Whether this is the service administrator, the user created automatically at provisioning time, which cannot be deleted |
| `checksum` | string | read-only | Hash of the resource used for concurrency control |
| `createdAt` | string (date-time) | read-only | Date at which the user was created |
| `credentialsLastUpdatedAt` | string (date-time) | read-only | Date at which the user credentials were last updated |
| `id` | string (uuid) | read-only | Unique identifier of the user |
| `password` | string (password) | read-only | Password of the user. Returned only on creation or password reset. |
| `status` | publicCloud.database.UserStatusEnum | read-only | Current readiness status of the user — one of `CREATING`, `DELETING`, `ERROR`, `READY`, `UPDATING` |
| `username` | string | read-only | Login name of the user |

```json
{
  "acls": [
    {
      "pattern": "string",
      "permission": "ADMIN"
    }
  ],
  "admin": true,
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "credentialsLastUpdatedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "password": "string",
  "status": "CREATING",
  "username": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user" \
  -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: publicCloud.database.opensearch.UserCreation
result = client.post("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user",
	acls = None, # ACL entries to grant to the user (type: array)
	name = None, # Login name of the new user (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: publicCloud.database.opensearch.UserCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user", array(
	acls => null, // ACL entries to grant to the user (type: array)
	name => null, // Login name of the new user (type: string)
));

print_r($result);
?>
```

## Delete a user

`DELETE /v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/opensearch/users/#delete-publiccloud-project-projectid-managedanalytics-opensearch-serviceid-user-userid

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:analytics/opensearch/user/delete`

Permanently deletes the user.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `userId` | path | string (uuid) | yes | User ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.database.opensearch.User | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acls` | publicCloud.database.opensearch.UserAcl[] | read-only | ACL entries granted to the user |
| `acls[].pattern` | string | yes | Index pattern this ACL applies to |
| `acls[].permission` | publicCloud.database.opensearch.AclPermissionEnum | yes | Permission granted on the matching indexes — one of `ADMIN`, `DENY`, `READ`, `READ_WRITE`, `WRITE` |
| `admin` | boolean | read-only | Whether this is the service administrator, the user created automatically at provisioning time, which cannot be deleted |
| `checksum` | string | read-only | Hash of the resource used for concurrency control |
| `createdAt` | string (date-time) | read-only | Date at which the user was created |
| `credentialsLastUpdatedAt` | string (date-time) | read-only | Date at which the user credentials were last updated |
| `id` | string (uuid) | read-only | Unique identifier of the user |
| `password` | string (password) | read-only | Password of the user. Returned only on creation or password reset. |
| `status` | publicCloud.database.UserStatusEnum | read-only | Current readiness status of the user — one of `CREATING`, `DELETING`, `ERROR`, `READY`, `UPDATING` |
| `username` | string | read-only | Login name of the user |

```json
{
  "acls": [
    {
      "pattern": "string",
      "permission": "ADMIN"
    }
  ],
  "admin": true,
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "credentialsLastUpdatedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "password": "string",
  "status": "CREATING",
  "username": "string"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}" \
  -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("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}")

# 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("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}");

print_r($result);
?>
```

## Update a user

`PUT /v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/opensearch/users/#put-publiccloud-project-projectid-managedanalytics-opensearch-serviceid-user-userid

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:analytics/opensearch/user/edit`

Updates the ACL entries of the user. The ACL list replaces the current entries. To reset the password, use the resetPassword route of the user or a partial update with credentialsLastUpdatedAt.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `userId` | path | string (uuid) | yes | User ID |

### Request body (required)

Type: `publicCloud.database.opensearch.UserReplace`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acls` | publicCloud.database.opensearch.UserAcl[] | yes | ACL entries for the user |
| `acls[].pattern` | string | yes | Index pattern this ACL applies to |
| `acls[].permission` | publicCloud.database.opensearch.AclPermissionEnum | yes | Permission granted on the matching indexes — one of `ADMIN`, `DENY`, `READ`, `READ_WRITE`, `WRITE` |

```json
{
  "acls": [
    {
      "pattern": "string",
      "permission": "ADMIN"
    }
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.database.opensearch.User | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acls` | publicCloud.database.opensearch.UserAcl[] | read-only | ACL entries granted to the user |
| `acls[].pattern` | string | yes | Index pattern this ACL applies to |
| `acls[].permission` | publicCloud.database.opensearch.AclPermissionEnum | yes | Permission granted on the matching indexes — one of `ADMIN`, `DENY`, `READ`, `READ_WRITE`, `WRITE` |
| `admin` | boolean | read-only | Whether this is the service administrator, the user created automatically at provisioning time, which cannot be deleted |
| `checksum` | string | read-only | Hash of the resource used for concurrency control |
| `createdAt` | string (date-time) | read-only | Date at which the user was created |
| `credentialsLastUpdatedAt` | string (date-time) | read-only | Date at which the user credentials were last updated |
| `id` | string (uuid) | read-only | Unique identifier of the user |
| `password` | string (password) | read-only | Password of the user. Returned only on creation or password reset. |
| `status` | publicCloud.database.UserStatusEnum | read-only | Current readiness status of the user — one of `CREATING`, `DELETING`, `ERROR`, `READY`, `UPDATING` |
| `username` | string | read-only | Login name of the user |

```json
{
  "acls": [
    {
      "pattern": "string",
      "permission": "ADMIN"
    }
  ],
  "admin": true,
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "credentialsLastUpdatedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "password": "string",
  "status": "CREATING",
  "username": "string"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}" \
  -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: publicCloud.database.opensearch.UserReplace
result = client.put("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}",
	acls = None, # ACL entries for the user (type: array)
)

# 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: publicCloud.database.opensearch.UserReplace
$result = $ovh->put("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}", array(
	acls => null, // ACL entries for the user (type: array)
));

print_r($result);
?>
```

## Partially update a user

`PATCH /v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/opensearch/users/#patch-publiccloud-project-projectid-managedanalytics-opensearch-serviceid-user-userid

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:analytics/opensearch/user/edit`

Partially updates the ACL entries of the user. The ACL list replaces the current entries. Setting credentialsLastUpdatedAt resets the password and returns the new one.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `userId` | path | string (uuid) | yes | User ID |

### Request body (required)

Type: `publicCloud.database.opensearch.UserUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acls` | publicCloud.database.opensearch.UserAcl[] |  | ACL entries for the user |
| `acls[].pattern` | string | yes | Index pattern this ACL applies to |
| `acls[].permission` | publicCloud.database.opensearch.AclPermissionEnum | yes | Permission granted on the matching indexes — one of `ADMIN`, `DENY`, `READ`, `READ_WRITE`, `WRITE` |
| `credentialsLastUpdatedAt` | string (date-time) |  | Date at which the user credentials were last updated. Setting this field triggers a credential reset and returns the new password. |

```json
{
  "acls": [
    {
      "pattern": "string",
      "permission": "ADMIN"
    }
  ],
  "credentialsLastUpdatedAt": "2024-01-01T12:00:00Z"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.database.opensearch.User | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acls` | publicCloud.database.opensearch.UserAcl[] | read-only | ACL entries granted to the user |
| `acls[].pattern` | string | yes | Index pattern this ACL applies to |
| `acls[].permission` | publicCloud.database.opensearch.AclPermissionEnum | yes | Permission granted on the matching indexes — one of `ADMIN`, `DENY`, `READ`, `READ_WRITE`, `WRITE` |
| `admin` | boolean | read-only | Whether this is the service administrator, the user created automatically at provisioning time, which cannot be deleted |
| `checksum` | string | read-only | Hash of the resource used for concurrency control |
| `createdAt` | string (date-time) | read-only | Date at which the user was created |
| `credentialsLastUpdatedAt` | string (date-time) | read-only | Date at which the user credentials were last updated |
| `id` | string (uuid) | read-only | Unique identifier of the user |
| `password` | string (password) | read-only | Password of the user. Returned only on creation or password reset. |
| `status` | publicCloud.database.UserStatusEnum | read-only | Current readiness status of the user — one of `CREATING`, `DELETING`, `ERROR`, `READY`, `UPDATING` |
| `username` | string | read-only | Login name of the user |

```json
{
  "acls": [
    {
      "pattern": "string",
      "permission": "ADMIN"
    }
  ],
  "admin": true,
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "credentialsLastUpdatedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "password": "string",
  "status": "CREATING",
  "username": "string"
}
```

### Example

```bash
curl -X PATCH \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}" \
  -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: publicCloud.database.opensearch.UserUpdate
result = client.patch("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}",
	acls = None, # ACL entries for the user (type: array)
	credentialsLastUpdatedAt = None, # Date at which the user credentials were last updated. Setting this field triggers a credential reset and returns the new password. (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: publicCloud.database.opensearch.UserUpdate
$result = $ovh->patch("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}", array(
	acls => null, // ACL entries for the user (type: array)
	credentialsLastUpdatedAt => null, // Date at which the user credentials were last updated. Setting this field triggers a credential reset and returns the new password. (type: string)
));

print_r($result);
?>
```

## List user permissions

`GET /v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/permissions`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/opensearch/users/#get-publiccloud-project-projectid-managedanalytics-opensearch-serviceid-permissions

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:analytics/opensearch/permissions/get`

Returns the permissions that can be granted to users on an index pattern.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |
| `serviceId` | path | string (uuid) | yes | Service ID |

### Responses

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

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

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/permissions" \
  -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("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/permissions")

# 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("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/permissions");

print_r($result);
?>
```

## Reset the password of a user

`POST /v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}/resetPassword`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/analytics/opensearch/users/#post-publiccloud-project-projectid-managedanalytics-opensearch-serviceid-user-userid-resetpassword

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:analytics/opensearch/user/credentials/reset`

Generates a new password for the user and returns it in the response. Reading the user never returns it. The previous password stops working once the new one is applied, and credentialsLastUpdatedAt becomes the date of this reset. This is the same reset as a partial update of the user that sets credentialsLastUpdatedAt.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `serviceId` | path | string (uuid) | yes | Service ID |
| `userId` | path | string (uuid) | yes | User ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.database.opensearch.User | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `acls` | publicCloud.database.opensearch.UserAcl[] | read-only | ACL entries granted to the user |
| `acls[].pattern` | string | yes | Index pattern this ACL applies to |
| `acls[].permission` | publicCloud.database.opensearch.AclPermissionEnum | yes | Permission granted on the matching indexes — one of `ADMIN`, `DENY`, `READ`, `READ_WRITE`, `WRITE` |
| `admin` | boolean | read-only | Whether this is the service administrator, the user created automatically at provisioning time, which cannot be deleted |
| `checksum` | string | read-only | Hash of the resource used for concurrency control |
| `createdAt` | string (date-time) | read-only | Date at which the user was created |
| `credentialsLastUpdatedAt` | string (date-time) | read-only | Date at which the user credentials were last updated |
| `id` | string (uuid) | read-only | Unique identifier of the user |
| `password` | string (password) | read-only | Password of the user. Returned only on creation or password reset. |
| `status` | publicCloud.database.UserStatusEnum | read-only | Current readiness status of the user — one of `CREATING`, `DELETING`, `ERROR`, `READY`, `UPDATING` |
| `username` | string | read-only | Login name of the user |

```json
{
  "acls": [
    {
      "pattern": "string",
      "permission": "ADMIN"
    }
  ],
  "admin": true,
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "credentialsLastUpdatedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "password": "string",
  "status": "CREATING",
  "username": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}/resetPassword" \
  -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.post("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}/resetPassword")

# 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("/v2/publicCloud/project/{projectId}/managedAnalytics/opensearch/{serviceId}/user/{userId}/resetPassword");

print_r($result);
?>
```
