Skip to content

Commit 7bee026

Browse files
fix(mongodb): create user2
1 parent 7cd8398 commit 7bee026

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

pages/managed-mongodb-databases/how-to/manage-users.mdx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,24 @@ You can create more users and grant them pre-set roles via the [Scaleway Managed
6363
-d '{
6464
"name": "<username>",
6565
"password": "<password>",
66+
}' \
67+
"https://api.scaleway.com/mongodb/v1alpha1/regions/fr-par/instances/{instance_id}/users"
68+
```
69+
70+
You should get a response like the following:
71+
```
72+
{
73+
"name": "<username>",
74+
"password": "<password>",
6675
"roles": [
6776
{
68-
"role": "string",
69-
"database": "string",
77+
"role": "<username>",
78+
"database": "<password>",
7079
"any_database": true
7180
}
7281
]
73-
}' \
74-
"https://api.scaleway.com/mongodb/v1alpha1/regions/fr-par/instances/{instance_id}/users"
82+
}
7583
```
7684

85+
### How to apply a role to a user
7786

0 commit comments

Comments
 (0)