Manage Organization Access
This API manages organization-level access permissions for users and user groups in PAM360. It allows you to grant or revoke access for specific organizations.
Request URL
https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/restapi/json/v1/organizations/manage
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": {
"userGroupIds": [1,2],
"userIds": [3,4],
"managePermission": "grant",
"orgIds": [301,302],
"approvalAdminId": "1"
}
}
}| Parameters | Description | Values |
|---|---|---|
userGroupIds | List of user group IDs to which the access has to be modified. | Default Value : N/A |
userIds | List of user IDs to which the access has to be modified. | Default Value : N/A |
managePermission | Action to manage permissions for the specified groups or users. | Default Value : N/A |
orgIds | List of organization IDs. | Default Value : N/A |
approvalAdminId | ID of the admin who approves the permission changes. | Default Value : N/A |
Sample Request
curl -X POST -H "AUTHTOKEN:<<Authtoken-generated-from-PAM360>>" -H "Content-Type:application/x-www-form-urlencoded" "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/organizations/manage" --data-urlencode "INPUT_DATA={\"operation\":{\"Details\":{\"userGroupIds\":[1,2],\"userIds\":[3,4],\"managePermission\":\"grant\",\"orgIds\":[301,302],\"approvalAdminId\":\"1\"}}}"
import requests import json url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/organizations/manage" headers = { "AUTHTOKEN": "<<Authtoken-generated-from-PAM360>>", "Content-Type": "application/x-www-form-urlencoded" } payload = { "operation": { "Details": { "userGroupIds": [1,2], "userIds": [3,4], "managePermission": "grant", "orgIds": [301,302], "approvalAdminId": "1" } } } form_data = { "INPUT_DATA": json.dumps(payload) } response = requests.post(url, headers=headers, data=form_data, verify=True) print("Status Code:", response.status_code) print("Response:", response.text)
$Url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/organizations/manage" $Headers = @{ "AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>" "Content-Type" = "application/x-www-form-urlencoded" } $Body = @{ INPUT_DATA = '{"operation":{"Details":{"userGroupIds":[1,2],"userIds":[3,4],"managePermission":"grant","orgIds":[301,302],"approvalAdminId":"1"}}}' } $response = Invoke-RestMethod -Uri $Url -Method Post -Headers $Headers -Body $Body $response | ConvertTo-Json -Depth 5
Sample Response
{
"operation": {
"result": {
"message": "Organization access modification triggered. Refer to the below for operation status details.",
"status": "Success",
"statusCode": 20001
},
"Details": {
"301": {
"userGroup": {
"1": {
"message": "Failed to modify the organization access permission.",
"status": "Failed",
"statusCode": 47009
},
"2": {
"message": "Invalid User Group ID.",
"status": "Failed",
"statusCode": 46000
}
},
"user": {
"4": {
"message": "Invalid User Id",
"status": "Failed",
"statusCode": 46001
},
"3": {
"message": "Invalid User Id",
"status": "Failed",
"statusCode": 46001
}
}
},
"302": {
"userGroup": {
"1": {
"message": "Failed to modify the organization access permission.",
"status": "Failed",
"statusCode": 47009
},
"2": {
"message": "Invalid User Group ID.",
"status": "Failed",
"statusCode": 46000
}
},
"user": {
"4": {
"message": "Invalid User Id",
"status": "Failed",
"statusCode": 46001
},
"3": {
"message": "Invalid User Id",
"status": "Failed",
"statusCode": 46001
}
}
}
},
"name": "MANAGE_ORGANIZATION"
}
}