pub struct SetUserApiKeyRequest {
pub dataset_ids: Option<Option<Vec<Uuid>>>,
pub name: String,
pub organization_ids: Option<Option<Vec<Uuid>>>,
pub role: i32,
pub scopes: Option<Option<Vec<String>>>,
}
Fields§
§dataset_ids: Option<Option<Vec<Uuid>>>
The dataset ids which the api key will have access to. If not provided or empty, the api key will have access to all datasets the auth’ed user has access to. If both dataset_ids and organization_ids are provided, the api key will have access to the intersection of the datasets and organizations.
name: String
The name which will be assigned to the new api key.
organization_ids: Option<Option<Vec<Uuid>>>
The organization ids which the api key will have access to. If not provided or empty, the api key will have access to all organizations the auth’ed user has access to.
role: i32
The role which will be assigned to the new api key. Either 0 (read), 1 (read and write at the level of the currently auth’ed user). The auth’ed user must have a role greater than or equal to the role being assigned which means they must be an admin (1) or owner (2) of the organization to assign write permissions with a role of 1.
scopes: Option<Option<Vec<String>>>
The routes which the api key will have access to. If not provided or empty, the api key will have access to all routes the auth’ed user has access to. Specify the routes as a list of strings. For example, ["GET /api/dataset", "POST /api/dataset"].
Implementations§
Source§impl SetUserApiKeyRequest
impl SetUserApiKeyRequest
pub fn new(name: String, role: i32) -> SetUserApiKeyRequest
Trait Implementations§
Source§impl Clone for SetUserApiKeyRequest
impl Clone for SetUserApiKeyRequest
Source§fn clone(&self) -> SetUserApiKeyRequest
fn clone(&self) -> SetUserApiKeyRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more