
### delete <a name="delete"></a>
Delete role and all associated permissions



**API Endpoint**: `DELETE /role/{id}`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .role()
    .delete(sideko_rest_api::resources::role::DeleteRequest {
        id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(),
    })
    .await;
```

### list <a name="list"></a>
List roles



**API Endpoint**: `GET /role`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .role()
    .list(sideko_rest_api::resources::role::ListRequest {
        ..Default::default()
    })
    .await;
```

### create <a name="create"></a>
Create a new role



**API Endpoint**: `POST /role`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .role()
    .create(sideko_rest_api::resources::role::CreateRequest {
        object_id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(),
        object_type: sideko_rest_api::models::ObjectTypeEnum::ApiProject,
        role_definition_id: sideko_rest_api::models::RoleDefinitionIdEnum::ApiProjectAdmin,
        user_id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(),
    })
    .await;
```
