public Request delete(String roleId) {
    Asserts.assertNotNull(roleId, "role id");

    final String url = baseUrl
        .newBuilder()
        .addEncodedPathSegments("api/v2/roles")
        .addEncodedPathSegments(roleId)
        .build()
        .toString();
    VoidRequest request = new VoidRequest(this.client, url, "DELETE");
    request.addHeader("Authorization", "Bearer " + apiToken);
    return request;
  }
public Request delete ( String roleId ) { Asserts . assertNotNull ( roleId , "role id" ) ; final String url = baseUrl . newBuilder ( ) . addEncodedPathSegments ( "api/v2/roles" ) . addEncodedPathSegments ( roleId ) . build ( ) . toString ( ) ; VoidRequest request = new VoidRequest ( this . client , url , "DELETE" ) ; request . addHeader ( "Authorization" , "Bearer " + apiToken ) ; return request ; }
Delete an existing Role.
A token with scope delete:roles is needed.
See https://auth0.com/docs/api/management/v2#!/Roles/delete_roles_by_id

@param roleId The id of the role to delete.
@return a Request to execute.