patch
/platform/iam/v1/user-group/{group_id}
This endpoint allows modification of an existing user group by providing the group_id in the path and the update details in the request body. Only specified fields will be updated. Please note that to remove attributes, you must provide either an empty string or empty list as the value of the respective field in the request body.
Path parameters
group_id
String
required
Full user group id
Full user group id
Example:
7f8a9b2c-4d5e-4f6a-8b9c-1d2e3f4a5b6c_123
CLIENT REQUEST
curl -X 'PATCH'
-H
'Accept: application/json'
-H
'Content-Type: application/json'
'https://api-cortex.paloaltonetworks.com/platform/iam/v1/user-group/{group_id}'
-d
'{
"request_data" : {
"group_name" : "test_group_name",
"role_id" : "role_name_123",
"description" : "Test Updated Description",
"users" : [ "test user" ],
"nested_group_ids" : [ "7f3o5b2c-4d5e-4f6a-8b9c-1d3o5f4a5b6c_123" ],
"idp_groups" : [ "test idp group" ]
}
}'
import http.client
conn = http.client.HTTPSConnection("api-")
payload = "{\"request_data\":{\"group_name\":\"test_group_name\",\"role_id\":\"role_name_123\",\"description\":\"Test Updated Description\",\"users\":[\"test user\"],\"nested_group_ids\":[\"7f3o5b2c-4d5e-4f6a-8b9c-1d3o5f4a5b6c_123\"],\"idp_groups\":[\"test idp group\"]}}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "%7Bfqdn%7D/platform/iam/v1/user-group/7f8a9b2c-4d5e-4f6a-8b9c-1d2e3f4a5b6c_123", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api-/%7Bfqdn%7D/platform/iam/v1/user-group/7f8a9b2c-4d5e-4f6a-8b9c-1d2e3f4a5b6c_123")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\"request_data\":{\"group_name\":\"test_group_name\",\"role_id\":\"role_name_123\",\"description\":\"Test Updated Description\",\"users\":[\"test user\"],\"nested_group_ids\":[\"7f3o5b2c-4d5e-4f6a-8b9c-1d3o5f4a5b6c_123\"],\"idp_groups\":[\"test idp group\"]}}"
response = http.request(request)
puts response.read_bodyconst data = JSON.stringify({
"request_data": {
"group_name": "test_group_name",
"role_id": "role_name_123",
"description": "Test Updated Description",
"users": [
"test user"
],
"nested_group_ids": [
"7f3o5b2c-4d5e-4f6a-8b9c-1d3o5f4a5b6c_123"
],
"idp_groups": [
"test idp group"
]
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("PATCH", "https://api-/%7Bfqdn%7D/platform/iam/v1/user-group/7f8a9b2c-4d5e-4f6a-8b9c-1d2e3f4a5b6c_123");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);HttpResponse<String> response = Unirest.patch("https://api-/%7Bfqdn%7D/platform/iam/v1/user-group/7f8a9b2c-4d5e-4f6a-8b9c-1d2e3f4a5b6c_123")
.header("content-type", "application/json")
.body("{\"request_data\":{\"group_name\":\"test_group_name\",\"role_id\":\"role_name_123\",\"description\":\"Test Updated Description\",\"users\":[\"test user\"],\"nested_group_ids\":[\"7f3o5b2c-4d5e-4f6a-8b9c-1d3o5f4a5b6c_123\"],\"idp_groups\":[\"test idp group\"]}}")
.asString();import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["request_data": [
"group_name": "test_group_name",
"role_id": "role_name_123",
"description": "Test Updated Description",
"users": ["test user"],
"nested_group_ids": ["7f3o5b2c-4d5e-4f6a-8b9c-1d3o5f4a5b6c_123"],
"idp_groups": ["test idp group"]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api-/%7Bfqdn%7D/platform/iam/v1/user-group/7f8a9b2c-4d5e-4f6a-8b9c-1d2e3f4a5b6c_123")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-/%7Bfqdn%7D/platform/iam/v1/user-group/7f8a9b2c-4d5e-4f6a-8b9c-1d2e3f4a5b6c_123",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "{\"request_data\":{\"group_name\":\"test_group_name\",\"role_id\":\"role_name_123\",\"description\":\"Test Updated Description\",\"users\":[\"test user\"],\"nested_group_ids\":[\"7f3o5b2c-4d5e-4f6a-8b9c-1d3o5f4a5b6c_123\"],\"idp_groups\":[\"test idp group\"]}}",
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-/%7Bfqdn%7D/platform/iam/v1/user-group/7f8a9b2c-4d5e-4f6a-8b9c-1d2e3f4a5b6c_123");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"request_data\":{\"group_name\":\"test_group_name\",\"role_id\":\"role_name_123\",\"description\":\"Test Updated Description\",\"users\":[\"test user\"],\"nested_group_ids\":[\"7f3o5b2c-4d5e-4f6a-8b9c-1d3o5f4a5b6c_123\"],\"idp_groups\":[\"test idp group\"]}}");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://api-/%7Bfqdn%7D/platform/iam/v1/user-group/7f8a9b2c-4d5e-4f6a-8b9c-1d2e3f4a5b6c_123");
var request = new RestRequest(Method.PATCH);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"request_data\":{\"group_name\":\"test_group_name\",\"role_id\":\"role_name_123\",\"description\":\"Test Updated Description\",\"users\":[\"test user\"],\"nested_group_ids\":[\"7f3o5b2c-4d5e-4f6a-8b9c-1d3o5f4a5b6c_123\"],\"idp_groups\":[\"test idp group\"]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);Body parameters
required
request_dataobjectrequired
group_namestring
role_idstring
descriptionstring
usersarray[string]
nested_group_idsarray[string]
idp_groupsarray[string]
application/json
Request object for editing an existing user group
request_dataobjectrequiredThe data fields to update for the user group
The data fields to update for the user group
group_namestringThe new name for the user group
The new name for the user group
role_idstringThe unique identifier of the new role to assign to this group
The unique identifier of the new role to assign to this group
descriptionstringThe updated description for the user group
The updated description for the user group
usersarray[string]The updated list of user email addresses for the group
The updated list of user email addresses for the group
nested_group_idsarray[string]The updated list of nested group identifiers
The updated list of nested group identifiers
idp_groupsarray[string]The updated list of associated identity provider (IdP) group names
The updated list of associated identity provider (IdP) group names
REQUEST
{
"request_data": {
"group_name": "test_group_name",
"role_id": "role_name_123",
"description": "Test Updated Description",
"users": [
"test user"
],
"nested_group_ids": [
"7f3o5b2c-4d5e-4f6a-8b9c-1d3o5f4a5b6c_123"
],
"idp_groups": [
"test idp group"
]
}
}Responses