Transfer User Accountabilities
POST
This API transfers all resource and account ownership responsibilities from one user to another in PAM360. It helps reassign accountabilities when a user leaves the organization or changes roles.
Request URL
https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/restapi/json/v1/user/transferUserAccountabilities
Header Parameters
{
"AUTHTOKEN" : "<<Authtoken-generated-from-PAM360>>",
"orgName" : "<<org display name>>"
}| Parameter | Description | Values |
|---|---|---|
AUTHTOKEN | Authentication token for the user to authorize the API request. | Default Value : N/A |
orgName | Organization name available in PAM360. | Default Value : The organization to which the user belongs. |
Body Parameters
INPUT_DATA = {
"operation": {
"Details": {
"oldUserId": 309,
"newUserId": 582,
}
}
}| Parameters | Description | Values |
|---|---|---|
oldUserId | ID of the existing user to be replaced or updated. | Default Value : N/A |
newUserId | ID of the user to whom the ownership is transferred. | Default Value : N/A |
Sample Request
cURLPythonPowerShell
curl -X POST -H "AUTHTOKEN:<<Authtoken-generated-from-PAM360>>" -H "orgName:msp" -H "Content-Type: application/x-www-form-urlencoded" https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/user/transferUserAccountabilities --data-urlencode "INPUT_DATA={\"operation\":{\"Details\":{\"oldUserId\":1,\"newUserId\":2}}}"
import requests url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/user/transferUserAccountabilities" headers = { "AUTHTOKEN": "<<Authtoken-generated-from-PAM360>>", "orgName": "MyOrgName", "Content-Type": "application/x-www-form-urlencoded" } payload = { "INPUT_DATA": '{"operation":{"Details":{"oldUserId":309,"newUserId":582}}}' } response = requests.post(url, headers=headers, data=payload, verify=True) print(response.text)
# API endpoint $Url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/user/transferUserAccountabilities" # Headers $Headers = @{ "AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>"; "Content-Type" = "application/x-www-form-urlencoded" } # Payload $Body = @{ INPUT_DATA = '{ "operation": { "Details": { "oldUserId": 309, "newUserId": 582 } } }' } # Send POST request $response = Invoke-RestMethod -Uri $Url -Method Post -Headers $Headers -Body $Body # Show response $response | ConvertTo-Json -Depth 5
Sample Response
{
"operation": {
"result": {
"message": "The following accountabilities were transferred from admin-11h to admin-11k: Owned Resources, Resource Groups, SSH Keys and SSL Certificates, Scheduled Tasks, Access Control Privileges, Access Policies, ME Integration, Notifications, MSP Organization Permissions and Password Reset Capabilities.",
"status": "Success",
"statusCode": 20000
},
"name": "TRANSFER_USER_ACCOUNTABILITIES"
}
}