Skip to content
Docs
Roles

Revoke role from application

Revoke role from application

client.Zones.Applications.Roles.Revoke(ctx, roleID, params) error
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 ZoneApplicationRoleRevokeParams
ZoneID param.Field[string]

Path param: Zone ID

ApplicationID param.Field[string]

Path param: Application ID

ScopeID param.Field[string]optional

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

minLength1
ScopeType param.Field[string]optional

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

minLength1

Revoke role from application

package main

import (
  "context"

  "github.com/keycardai/keycard-go"
  "github.com/keycardai/keycard-go/option"
)

func main() {
  client := keycard.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Zones.Applications.Roles.Revoke(
    context.TODO(),
    "roleId",
    keycard.ZoneApplicationRoleRevokeParams{
      ZoneID: "zoneId",
      ApplicationID: "applicationId",
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples