Revoke Privilege
POST
/api/v1/permissions/revoke
const url = 'https://example.com/api/v1/permissions/revoke';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"privilege":"example","object_type":"example","object_name":"example","grantee_name":"example","grantee_type":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/permissions/revoke \ --header 'Content-Type: application/json' \ --data '{ "privilege": "example", "object_type": "example", "object_name": "example", "grantee_name": "example", "grantee_type": "example" }'Revoke a privilege on an object from a user/role.
Args: request: Revoke request details
Returns: PermissionOperationResponse with operation result
Raises: HTTPException: If revoke operation fails
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
RevokeRequest
Request to revoke a privilege.
object
privilege
required
Privilege
Privilege to revoke
string
object_type
required
Object Type
Object type
string
object_name
required
Object Name
Object name
string
grantee_name
required
Grantee Name
User/role to revoke from
string
grantee_type
required
Grantee Type
Grantee type (USER or ROLE)
string
Examplegenerated
{ "privilege": "example", "object_type": "example", "object_name": "example", "grantee_name": "example", "grantee_type": "example"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
PermissionOperationResponse
Response for permission operations.
object
Examplegenerated
{ "success": true, "message": "example", "details": {}}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}