Skip to content
Docs
Roles

Revoke role from application

Revoke role from application

client.zones.applications.roles.revoke(stringroleID, RoleRevokeParams { zoneId, applicationId, scope_id, scope_type } params, RequestOptionsoptions?): void
DELETE/zones/{zoneId}/applications/{applicationId}/roles/{roleId}

Revokes a role from the application. Provide the same (scope_type, scope_id) pair the grant was created with, or omit both to revoke the unscoped grant.

ParametersExpand Collapse
roleID: string
params: RoleRevokeParams { zoneId, applicationId, scope_id, scope_type }
zoneId: string

Path param: Zone ID

applicationId: string

Path param: Application ID

scope_id?: string

Query param: Scope target of the grant to revoke. Provide together with scope_type.

minLength1
scope_type?: string

Query param: Scope kind of the grant to revoke. Provide together with scope_id.

minLength1

Revoke role from application

import KeycardAPI from '@keycardai/api';

const client = new KeycardAPI({
  apiKey: process.env['KEYCARD_API_API_KEY'], // This is the default and can be omitted
});

await client.zones.applications.roles.revoke('roleId', {
  zoneId: 'zoneId',
  applicationId: 'applicationId',
});
Returns Examples