> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# grant_permission_credential

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/grant_permission_credential.rs#L25-L38)
pub async fn [grant\_permission\_credential](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/grant-permission-credential.md#method.grant_permission_credential)( \&self, name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), permission: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), credential\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[GrantPermissionCredentialResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.GrantPermissionCredentialResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Grant a credential-level permission to a user or role\[DEPRECATED–please use `/grant/permission` instead] Grants a credential-level permission to a user or role.

##### Arguments

<ul>
  <li>`name` - Name of the user or role to which the permission will be granted. Must be an existing user or role.</li>
  <li>`permission` - Permission to grant to the user or role.</li>
  <li>`credential_name` - Name of the credential on which the permission will be granted. Must be an existing credential, or an empty string to grant access on all credentials.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/grant_permission_credential.rs#L55-L75)
pub async fn [grant\_permission\_credential\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/grant-permission-credential.md#method.grant_permission_credential_with_opts)( \&self, name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), permission: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), credential\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), options: [GrantPermissionCredentialRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.GrantPermissionCredentialRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[GrantPermissionCredentialResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.GrantPermissionCredentialResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Grant a credential-level permission to a user or role\[DEPRECATED–please use `/grant/permission` instead] Grants a credential-level permission to a user or role.

##### Arguments

<ul>
  <li>`name` - Name of the user or role to which the permission will be granted. Must be an existing user or role.</li>
  <li>`permission` - Permission to grant to the user or role.</li>
  <li>`credential_name` - Name of the credential on which the permission will be granted. Must be an existing credential, or an empty string to grant access on all credentials.</li>
  <li>`options` - The optional parameters; any left unset take the server’s defaults.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/grant_permission_credential.rs#L78-L89)
pub async fn [grant\_permission\_credential\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/grant-permission-credential.md#method.grant_permission_credential_raw)( \&self, request: &[GrantPermissionCredentialRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.GrantPermissionCredentialRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[GrantPermissionCredentialResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.GrantPermissionCredentialResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`GrantPermissionCredentialRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.GrantPermissionCredentialRequest) to the `/grant/permission/credential` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/grant_permission_credential.rs#L93-L105)
pub async fn [grant\_permission\_credential\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/grant-permission-credential.md#method.grant_permission_credential_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[GrantPermissionCredentialRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.GrantPermissionCredentialRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[GrantPermissionCredentialResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.GrantPermissionCredentialResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`GrantPermissionCredentialRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.GrantPermissionCredentialRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.