update_principal
PATCH
/admin/principals/{id}
curl --request PATCH \ --url http://localhost:3001/admin/principals/00000000-0000-0000-0000-000000000000 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{"code":null,"display_name":null,"external_subject":null,"principal_type":null,"status":null}'import requests
url = "http://localhost:3001/admin/principals/00000000-0000-0000-0000-000000000000"
payload = { "code": None, "display_name": None, "external_subject": None, "principal_type": None, "status": None}headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())use std::str::FromStr;use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "http://localhost:3001/admin/principals/00000000-0000-0000-0000-000000000000";
let payload = json!({ "code": json!(null), "display_name": json!(null), "external_subject": json!(null), "principal_type": json!(null), "status": json!(null) });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Principal ID
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
string
display_name
string
external_subject
string
principal_type
string
status
string
Example generated
{ "code": "example", "display_name": "example", "external_subject": "example", "principal_type": "example", "status": "example"}Responses
Section titled “Responses”Updated
Media typeapplication/json
object
code
required
string
created_at
required
string format: date-time
display_name
string
external_subject
string
id
required
string format: uuid
principal_type
required
string
status
required
string
updated_at
required
string format: date-time
Example generated
{ "code": "example", "created_at": "2026-04-15T12:00:00Z", "display_name": "example", "external_subject": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "principal_type": "example", "status": "example", "updated_at": "2026-04-15T12:00:00Z"}Not found