Update User
curl --request PUT \
--url https://api.example.com/api/identity/users/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"password": "<string>",
"role_group_id": "<string>",
"role_group_ids": [
"<string>"
],
"role_assignments": [
{
"role_level": 123,
"role_group_id": "<string>",
"is_active": true
}
],
"role_level": 123,
"use_sso": true,
"is_disabled": true
}
'import requests
url = "https://api.example.com/api/identity/users/update"
payload = {
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"password": "<string>",
"role_group_id": "<string>",
"role_group_ids": ["<string>"],
"role_assignments": [
{
"role_level": 123,
"role_group_id": "<string>",
"is_active": True
}
],
"role_level": 123,
"use_sso": True,
"is_disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone_number: '<string>',
password: '<string>',
role_group_id: '<string>',
role_group_ids: ['<string>'],
role_assignments: [{role_level: 123, role_group_id: '<string>', is_active: true}],
role_level: 123,
use_sso: true,
is_disabled: true
})
};
fetch('https://api.example.com/api/identity/users/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/identity/users/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => '<string>',
'phone_number' => '<string>',
'password' => '<string>',
'role_group_id' => '<string>',
'role_group_ids' => [
'<string>'
],
'role_assignments' => [
[
'role_level' => 123,
'role_group_id' => '<string>',
'is_active' => true
]
],
'role_level' => 123,
'use_sso' => true,
'is_disabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/identity/users/update"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\",\n \"role_group_id\": \"<string>\",\n \"role_group_ids\": [\n \"<string>\"\n ],\n \"role_assignments\": [\n {\n \"role_level\": 123,\n \"role_group_id\": \"<string>\",\n \"is_active\": true\n }\n ],\n \"role_level\": 123,\n \"use_sso\": true,\n \"is_disabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/api/identity/users/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\",\n \"role_group_id\": \"<string>\",\n \"role_group_ids\": [\n \"<string>\"\n ],\n \"role_assignments\": [\n {\n \"role_level\": 123,\n \"role_group_id\": \"<string>\",\n \"is_active\": true\n }\n ],\n \"role_level\": 123,\n \"use_sso\": true,\n \"is_disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/identity/users/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\",\n \"role_group_id\": \"<string>\",\n \"role_group_ids\": [\n \"<string>\"\n ],\n \"role_assignments\": [\n {\n \"role_level\": 123,\n \"role_group_id\": \"<string>\",\n \"is_active\": true\n }\n ],\n \"role_level\": 123,\n \"use_sso\": true,\n \"is_disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"detail": {
"code": "unsupported_api_version",
"message": "API-Version header is unsupported.",
"supported_versions": [
"1"
]
}
}{
"detail": "Not authenticated"
}{
"detail": "Access denied: insufficient permissions"
}{
"detail": "Resource not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Users
Update User
Overview
Endpoint for update user.
Requirements
- Header:
API-Version: 1 - Authentication:
Authorization: Bearer <token>(if protected)
PUT
/
api
/
identity
/
users
/
update
Update User
curl --request PUT \
--url https://api.example.com/api/identity/users/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"password": "<string>",
"role_group_id": "<string>",
"role_group_ids": [
"<string>"
],
"role_assignments": [
{
"role_level": 123,
"role_group_id": "<string>",
"is_active": true
}
],
"role_level": 123,
"use_sso": true,
"is_disabled": true
}
'import requests
url = "https://api.example.com/api/identity/users/update"
payload = {
"name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"password": "<string>",
"role_group_id": "<string>",
"role_group_ids": ["<string>"],
"role_assignments": [
{
"role_level": 123,
"role_group_id": "<string>",
"is_active": True
}
],
"role_level": 123,
"use_sso": True,
"is_disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone_number: '<string>',
password: '<string>',
role_group_id: '<string>',
role_group_ids: ['<string>'],
role_assignments: [{role_level: 123, role_group_id: '<string>', is_active: true}],
role_level: 123,
use_sso: true,
is_disabled: true
})
};
fetch('https://api.example.com/api/identity/users/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/identity/users/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => '<string>',
'phone_number' => '<string>',
'password' => '<string>',
'role_group_id' => '<string>',
'role_group_ids' => [
'<string>'
],
'role_assignments' => [
[
'role_level' => 123,
'role_group_id' => '<string>',
'is_active' => true
]
],
'role_level' => 123,
'use_sso' => true,
'is_disabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/identity/users/update"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\",\n \"role_group_id\": \"<string>\",\n \"role_group_ids\": [\n \"<string>\"\n ],\n \"role_assignments\": [\n {\n \"role_level\": 123,\n \"role_group_id\": \"<string>\",\n \"is_active\": true\n }\n ],\n \"role_level\": 123,\n \"use_sso\": true,\n \"is_disabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/api/identity/users/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\",\n \"role_group_id\": \"<string>\",\n \"role_group_ids\": [\n \"<string>\"\n ],\n \"role_assignments\": [\n {\n \"role_level\": 123,\n \"role_group_id\": \"<string>\",\n \"is_active\": true\n }\n ],\n \"role_level\": 123,\n \"use_sso\": true,\n \"is_disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/identity/users/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\",\n \"role_group_id\": \"<string>\",\n \"role_group_ids\": [\n \"<string>\"\n ],\n \"role_assignments\": [\n {\n \"role_level\": 123,\n \"role_group_id\": \"<string>\",\n \"is_active\": true\n }\n ],\n \"role_level\": 123,\n \"use_sso\": true,\n \"is_disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"detail": {
"code": "unsupported_api_version",
"message": "API-Version header is unsupported.",
"supported_versions": [
"1"
]
}
}{
"detail": "Not authenticated"
}{
"detail": "Access denied: insufficient permissions"
}{
"detail": "Resource not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Query Parameters
Body
application/json
Response
Successful Response