Updating Users
This step shows how to update Perculus users.
Below is a list of avaliable parameters for updating users.
Example payload:
curl --location --request PUT 'https://<DOMAIN>/xapi/user/<USER_ID>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "John1",
"surname": "Doe1",
"username": "johndoe1",
"email": "john@doe.com1"
}'
from perculus_sdk.client import APIClient
# API client
client = APIClient()
...
# Update user
user = client.users.update_user("<USER_ID>",{
"name": "john1",
"surname": "Doe1",
"username": "johndoe1",
"email": "john@doe.com1"
})
print(user)
// ASAP :)
import APIClient from "perculus-sdk"
// API client
const client = new APIClient()
...
// Update user
const user = client.users.updateUser("<USER_ID>", {
name: "<USER_NAME>",
surname: "<USER_SURNAME>",
username: "<USERNAME>",
email: "<USER_EMAIL>",
role: "<USER_ROLE>"
})
console.log(user)
// ASAP :)
Example response:
{
"user_id": "<USER_ID>",
"name": "john1",
"surname": "Doe1",
"username": "johndoe1",
"email": "john@doe.com1",
"role": "u",
"mobile": "",
"login_allowed": true,
"status": 1,
"lang": "tr-TR",
"timezone": null,
"expires_at": null,
"creation_date": "2024-08-01T00:45:03.8888474+00:00",
"updating_date": null
}
Last updated