Struct okta::applications::Applications
source · pub struct Applications {
pub client: Client,
}
Fields§
§client: Client
Implementations§
source§impl Applications
impl Applications
sourcepub async fn list(
&self,
q: &str,
after: &str,
limit: i64,
filter: &str,
expand: &str,
include_non_deleted: bool
) -> Result<Response<Vec<Application>>, ClientError>
pub async fn list( &self, q: &str, after: &str, limit: i64, filter: &str, expand: &str, include_non_deleted: bool ) -> Result<Response<Vec<Application>>, ClientError>
List Applications.
This function performs a GET
to the /api/v1/apps
endpoint.
Enumerates apps added to your organization with pagination. A subset of apps can be returned that match a supported filter expression or query.
Parameters:
q: &str
after: &str
– Specifies the pagination cursor for the next page of apps.limit: i64
– Specifies the number of results for a page.filter: &str
– Filters apps by status, user.id, group.id or credentials.signing.kid expression.expand: &str
– Traverses users link relationship and optionally embeds Application User resource.include_non_deleted: bool
sourcepub async fn list_all(
&self,
q: &str,
filter: &str,
expand: &str,
include_non_deleted: bool
) -> Result<Response<Vec<Application>>, ClientError>
pub async fn list_all( &self, q: &str, filter: &str, expand: &str, include_non_deleted: bool ) -> Result<Response<Vec<Application>>, ClientError>
List Applications.
This function performs a GET
to the /api/v1/apps
endpoint.
As opposed to list
, this function returns all the pages of the request at once.
Enumerates apps added to your organization with pagination. A subset of apps can be returned that match a supported filter expression or query.
sourcepub async fn create(
&self,
activate: bool,
body: &Application
) -> Result<Response<Application>, ClientError>
pub async fn create( &self, activate: bool, body: &Application ) -> Result<Response<Application>, ClientError>
Add Application.
This function performs a POST
to the /api/v1/apps
endpoint.
Adds a new application to your Okta organization.
Parameters:
activate: bool
– Executes activation lifecycle operation when creating the app.okta_access_gateway_agent: &str
sourcepub async fn get(
&self,
app_id: &str,
expand: &str
) -> Result<Response<Application>, ClientError>
pub async fn get( &self, app_id: &str, expand: &str ) -> Result<Response<Application>, ClientError>
Get Application.
This function performs a GET
to the /api/v1/apps/{appId}
endpoint.
Fetches an application from your Okta organization by id
.
Parameters:
app_id: &str
expand: &str
sourcepub async fn update(
&self,
app_id: &str,
body: &Application
) -> Result<Response<Application>, ClientError>
pub async fn update( &self, app_id: &str, body: &Application ) -> Result<Response<Application>, ClientError>
Update Application.
This function performs a PUT
to the /api/v1/apps/{appId}
endpoint.
Updates an application in your organization.
Parameters:
app_id: &str
sourcepub async fn delete(&self, app_id: &str) -> Result<Response<()>, ClientError>
pub async fn delete(&self, app_id: &str) -> Result<Response<()>, ClientError>
Delete Application.
This function performs a DELETE
to the /api/v1/apps/{appId}
endpoint.
Removes an inactive application.
Parameters:
app_id: &str
sourcepub async fn list_csrs_fors(
&self,
app_id: &str
) -> Result<Response<Vec<Csr>>, ClientError>
pub async fn list_csrs_fors( &self, app_id: &str ) -> Result<Response<Vec<Csr>>, ClientError>
List Certificate Signing Requests for Application.
This function performs a GET
to the /api/v1/apps/{appId}/credentials/csrs
endpoint.
Enumerates Certificate Signing Requests for an application
Parameters:
app_id: &str
sourcepub async fn list_all_csrs_fors(
&self,
app_id: &str
) -> Result<Response<Vec<Csr>>, ClientError>
pub async fn list_all_csrs_fors( &self, app_id: &str ) -> Result<Response<Vec<Csr>>, ClientError>
List Certificate Signing Requests for Application.
This function performs a GET
to the /api/v1/apps/{appId}/credentials/csrs
endpoint.
As opposed to list_csrs_for
, this function returns all the pages of the request at once.
Enumerates Certificate Signing Requests for an application
sourcepub async fn generate_csr_for(
&self,
app_id: &str,
body: &CsrMetadata
) -> Result<Response<Csr>, ClientError>
pub async fn generate_csr_for( &self, app_id: &str, body: &CsrMetadata ) -> Result<Response<Csr>, ClientError>
Generate Certificate Signing Request for Application.
This function performs a POST
to the /api/v1/apps/{appId}/credentials/csrs
endpoint.
Generates a new key pair and returns the Certificate Signing Request for it.
Parameters:
app_id: &str
sourcepub async fn get_csr_for(
&self,
app_id: &str,
csr_id: &str
) -> Result<Response<Csr>, ClientError>
pub async fn get_csr_for( &self, app_id: &str, csr_id: &str ) -> Result<Response<Csr>, ClientError>
This function performs a GET
to the /api/v1/apps/{appId}/credentials/csrs/{csrId}
endpoint.
Parameters:
app_id: &str
csr_id: &str
sourcepub async fn revoke_csr_from(
&self,
app_id: &str,
csr_id: &str
) -> Result<Response<()>, ClientError>
pub async fn revoke_csr_from( &self, app_id: &str, csr_id: &str ) -> Result<Response<()>, ClientError>
This function performs a DELETE
to the /api/v1/apps/{appId}/credentials/csrs/{csrId}
endpoint.
Parameters:
app_id: &str
csr_id: &str
sourcepub async fn post_app_credentials_csr_lifecycle_publish(
&self,
app_id: &str,
csr_id: &str
) -> Result<Response<JsonWebKey>, ClientError>
pub async fn post_app_credentials_csr_lifecycle_publish( &self, app_id: &str, csr_id: &str ) -> Result<Response<JsonWebKey>, ClientError>
This function performs a POST
to the /api/v1/apps/{appId}/credentials/csrs/{csrId}/lifecycle/publish
endpoint.
Parameters:
app_id: &str
csr_id: &str
sourcepub async fn list_keys(
&self,
app_id: &str
) -> Result<Response<Vec<JsonWebKey>>, ClientError>
pub async fn list_keys( &self, app_id: &str ) -> Result<Response<Vec<JsonWebKey>>, ClientError>
List Key Credentials for Application.
This function performs a GET
to the /api/v1/apps/{appId}/credentials/keys
endpoint.
Enumerates key credentials for an application
Parameters:
app_id: &str
sourcepub async fn list_all_keys(
&self,
app_id: &str
) -> Result<Response<Vec<JsonWebKey>>, ClientError>
pub async fn list_all_keys( &self, app_id: &str ) -> Result<Response<Vec<JsonWebKey>>, ClientError>
List Key Credentials for Application.
This function performs a GET
to the /api/v1/apps/{appId}/credentials/keys
endpoint.
As opposed to list_keys
, this function returns all the pages of the request at once.
Enumerates key credentials for an application
sourcepub async fn generate_key(
&self,
app_id: &str,
validity_years: i64
) -> Result<Response<JsonWebKey>, ClientError>
pub async fn generate_key( &self, app_id: &str, validity_years: i64 ) -> Result<Response<JsonWebKey>, ClientError>
This function performs a POST
to the /api/v1/apps/{appId}/credentials/keys/generate
endpoint.
Generates a new X.509 certificate for an application key credential
Parameters:
app_id: &str
validity_years: i64
sourcepub async fn get_key(
&self,
app_id: &str,
key_id: &str
) -> Result<Response<JsonWebKey>, ClientError>
pub async fn get_key( &self, app_id: &str, key_id: &str ) -> Result<Response<JsonWebKey>, ClientError>
Get Key Credential for Application.
This function performs a GET
to the /api/v1/apps/{appId}/credentials/keys/{keyId}
endpoint.
Gets a specific application key credential by kid
Parameters:
app_id: &str
key_id: &str
sourcepub async fn clone_key(
&self,
app_id: &str,
key_id: &str,
target_aid: &str
) -> Result<Response<JsonWebKey>, ClientError>
pub async fn clone_key( &self, app_id: &str, key_id: &str, target_aid: &str ) -> Result<Response<JsonWebKey>, ClientError>
Clone Application Key Credential.
This function performs a POST
to the /api/v1/apps/{appId}/credentials/keys/{keyId}/clone
endpoint.
Clones a X.509 certificate for an application key credential from a source application to target application.
Parameters:
app_id: &str
key_id: &str
target_aid: &str
– Unique key of the target Application.
sourcepub async fn list_scope_consent_grants(
&self,
app_id: &str,
expand: &str
) -> Result<Response<Vec<OAuth2ScopeConsentGrant>>, ClientError>
pub async fn list_scope_consent_grants( &self, app_id: &str, expand: &str ) -> Result<Response<Vec<OAuth2ScopeConsentGrant>>, ClientError>
This function performs a GET
to the /api/v1/apps/{appId}/grants
endpoint.
Lists all scope consent grants for the application
Parameters:
app_id: &str
expand: &str
sourcepub async fn list_all_scope_consent_grants(
&self,
app_id: &str,
expand: &str
) -> Result<Response<Vec<OAuth2ScopeConsentGrant>>, ClientError>
pub async fn list_all_scope_consent_grants( &self, app_id: &str, expand: &str ) -> Result<Response<Vec<OAuth2ScopeConsentGrant>>, ClientError>
This function performs a GET
to the /api/v1/apps/{appId}/grants
endpoint.
As opposed to list_scope_consent_grants
, this function returns all the pages of the request at once.
Lists all scope consent grants for the application
sourcepub async fn grant_consent_scope(
&self,
app_id: &str,
body: &OAuth2ScopeConsentGrant
) -> Result<Response<OAuth2ScopeConsentGrant>, ClientError>
pub async fn grant_consent_scope( &self, app_id: &str, body: &OAuth2ScopeConsentGrant ) -> Result<Response<OAuth2ScopeConsentGrant>, ClientError>
This function performs a POST
to the /api/v1/apps/{appId}/grants
endpoint.
Grants consent for the application to request an OAuth 2.0 Okta scope
Parameters:
app_id: &str
sourcepub async fn get_scope_consent_grant(
&self,
app_id: &str,
grant_id: &str,
expand: &str
) -> Result<Response<OAuth2ScopeConsentGrant>, ClientError>
pub async fn get_scope_consent_grant( &self, app_id: &str, grant_id: &str, expand: &str ) -> Result<Response<OAuth2ScopeConsentGrant>, ClientError>
This function performs a GET
to the /api/v1/apps/{appId}/grants/{grantId}
endpoint.
Fetches a single scope consent grant for the application
Parameters:
app_id: &str
grant_id: &str
expand: &str
sourcepub async fn revoke_scope_consent_grant(
&self,
app_id: &str,
grant_id: &str
) -> Result<Response<()>, ClientError>
pub async fn revoke_scope_consent_grant( &self, app_id: &str, grant_id: &str ) -> Result<Response<()>, ClientError>
This function performs a DELETE
to the /api/v1/apps/{appId}/grants/{grantId}
endpoint.
Revokes permission for the application to request the given scope
Parameters:
app_id: &str
grant_id: &str
sourcepub async fn list_group_assignments(
&self,
app_id: &str,
q: &str,
after: &str,
limit: i64,
expand: &str
) -> Result<Response<Vec<ApplicationGroupAssignment>>, ClientError>
pub async fn list_group_assignments( &self, app_id: &str, q: &str, after: &str, limit: i64, expand: &str ) -> Result<Response<Vec<ApplicationGroupAssignment>>, ClientError>
List Groups Assigned to Application.
This function performs a GET
to the /api/v1/apps/{appId}/groups
endpoint.
Enumerates group assignments for an application.
Parameters:
app_id: &str
q: &str
after: &str
– Specifies the pagination cursor for the next page of assignments.limit: i64
– Specifies the number of results for a page.expand: &str
sourcepub async fn list_all_group_assignments(
&self,
app_id: &str,
q: &str,
expand: &str
) -> Result<Response<Vec<ApplicationGroupAssignment>>, ClientError>
pub async fn list_all_group_assignments( &self, app_id: &str, q: &str, expand: &str ) -> Result<Response<Vec<ApplicationGroupAssignment>>, ClientError>
List Groups Assigned to Application.
This function performs a GET
to the /api/v1/apps/{appId}/groups
endpoint.
As opposed to list_group_assignments
, this function returns all the pages of the request at once.
Enumerates group assignments for an application.
sourcepub async fn get_group_assignment(
&self,
app_id: &str,
group_id: &str,
expand: &str
) -> Result<Response<ApplicationGroupAssignment>, ClientError>
pub async fn get_group_assignment( &self, app_id: &str, group_id: &str, expand: &str ) -> Result<Response<ApplicationGroupAssignment>, ClientError>
Get Assigned Group for Application.
This function performs a GET
to the /api/v1/apps/{appId}/groups/{groupId}
endpoint.
Fetches an application group assignment
Parameters:
app_id: &str
group_id: &str
expand: &str
sourcepub async fn create_group_assignment(
&self,
app_id: &str,
group_id: &str,
body: &ApplicationGroupAssignment
) -> Result<Response<ApplicationGroupAssignment>, ClientError>
pub async fn create_group_assignment( &self, app_id: &str, group_id: &str, body: &ApplicationGroupAssignment ) -> Result<Response<ApplicationGroupAssignment>, ClientError>
Assign Group to Application.
This function performs a PUT
to the /api/v1/apps/{appId}/groups/{groupId}
endpoint.
Assigns a group to an application
Parameters:
app_id: &str
group_id: &str
sourcepub async fn delete_group_assignment(
&self,
app_id: &str,
group_id: &str
) -> Result<Response<()>, ClientError>
pub async fn delete_group_assignment( &self, app_id: &str, group_id: &str ) -> Result<Response<()>, ClientError>
Remove Group from Application.
This function performs a DELETE
to the /api/v1/apps/{appId}/groups/{groupId}
endpoint.
Removes a group assignment from an application.
Parameters:
app_id: &str
group_id: &str
sourcepub async fn activate(&self, app_id: &str) -> Result<Response<()>, ClientError>
pub async fn activate(&self, app_id: &str) -> Result<Response<()>, ClientError>
Activate Application.
This function performs a POST
to the /api/v1/apps/{appId}/lifecycle/activate
endpoint.
Activates an inactive application.
Parameters:
app_id: &str
sourcepub async fn deactivate(
&self,
app_id: &str
) -> Result<Response<()>, ClientError>
pub async fn deactivate( &self, app_id: &str ) -> Result<Response<()>, ClientError>
Deactivate Application.
This function performs a POST
to the /api/v1/apps/{appId}/lifecycle/deactivate
endpoint.
Deactivates an active application.
Parameters:
app_id: &str
sourcepub async fn list_o_auth_2_tokens_fors(
&self,
app_id: &str,
expand: &str,
after: &str,
limit: i64
) -> Result<Response<Vec<OAuth2Token>>, ClientError>
pub async fn list_o_auth_2_tokens_fors( &self, app_id: &str, expand: &str, after: &str, limit: i64 ) -> Result<Response<Vec<OAuth2Token>>, ClientError>
This function performs a GET
to the /api/v1/apps/{appId}/tokens
endpoint.
Lists all tokens for the application
Parameters:
app_id: &str
expand: &str
after: &str
limit: i64
sourcepub async fn list_all_o_auth_2_tokens_fors(
&self,
app_id: &str,
expand: &str
) -> Result<Response<Vec<OAuth2Token>>, ClientError>
pub async fn list_all_o_auth_2_tokens_fors( &self, app_id: &str, expand: &str ) -> Result<Response<Vec<OAuth2Token>>, ClientError>
This function performs a GET
to the /api/v1/apps/{appId}/tokens
endpoint.
As opposed to list_o_auth_2_tokens_for
, this function returns all the pages of the request at once.
Lists all tokens for the application
sourcepub async fn revoke_o_auth_2_tokens_for(
&self,
app_id: &str
) -> Result<Response<()>, ClientError>
pub async fn revoke_o_auth_2_tokens_for( &self, app_id: &str ) -> Result<Response<()>, ClientError>
This function performs a DELETE
to the /api/v1/apps/{appId}/tokens
endpoint.
Revokes all tokens for the specified application
Parameters:
app_id: &str
sourcepub async fn get_o_auth_2_token_for(
&self,
app_id: &str,
token_id: &str,
expand: &str
) -> Result<Response<OAuth2Token>, ClientError>
pub async fn get_o_auth_2_token_for( &self, app_id: &str, token_id: &str, expand: &str ) -> Result<Response<OAuth2Token>, ClientError>
This function performs a GET
to the /api/v1/apps/{appId}/tokens/{tokenId}
endpoint.
Gets a token for the specified application
Parameters:
app_id: &str
token_id: &str
expand: &str
sourcepub async fn revoke_o_auth_2_token_for(
&self,
app_id: &str,
token_id: &str
) -> Result<Response<()>, ClientError>
pub async fn revoke_o_auth_2_token_for( &self, app_id: &str, token_id: &str ) -> Result<Response<()>, ClientError>
This function performs a DELETE
to the /api/v1/apps/{appId}/tokens/{tokenId}
endpoint.
Revokes the specified token for the specified application
Parameters:
app_id: &str
token_id: &str
sourcepub async fn list_users(
&self,
app_id: &str,
q: &str,
query_scope: &str,
after: &str,
limit: i64,
filter: &str,
expand: &str
) -> Result<Response<Vec<AppUser>>, ClientError>
pub async fn list_users( &self, app_id: &str, q: &str, query_scope: &str, after: &str, limit: i64, filter: &str, expand: &str ) -> Result<Response<Vec<AppUser>>, ClientError>
List Users Assigned to Application.
This function performs a GET
to the /api/v1/apps/{appId}/users
endpoint.
Enumerates all assigned application users for an application.
Parameters:
app_id: &str
q: &str
query_scope: &str
after: &str
– specifies the pagination cursor for the next page of assignments.limit: i64
– specifies the number of results for a page.filter: &str
expand: &str
sourcepub async fn list_all_users(
&self,
app_id: &str,
q: &str,
query_scope: &str,
filter: &str,
expand: &str
) -> Result<Response<Vec<AppUser>>, ClientError>
pub async fn list_all_users( &self, app_id: &str, q: &str, query_scope: &str, filter: &str, expand: &str ) -> Result<Response<Vec<AppUser>>, ClientError>
List Users Assigned to Application.
This function performs a GET
to the /api/v1/apps/{appId}/users
endpoint.
As opposed to list_users
, this function returns all the pages of the request at once.
Enumerates all assigned application users for an application.
sourcepub async fn assign_user(
&self,
app_id: &str,
body: &AppUser
) -> Result<Response<AppUser>, ClientError>
pub async fn assign_user( &self, app_id: &str, body: &AppUser ) -> Result<Response<AppUser>, ClientError>
Assign User to Application for SSO & Provisioning.
This function performs a POST
to the /api/v1/apps/{appId}/users
endpoint.
Assigns an user to an application with credentials and an app-specific profile. Profile mappings defined for the application are first applied before applying any profile properties specified in the request.
Parameters:
app_id: &str
sourcepub async fn get_user(
&self,
app_id: &str,
user_id: &str,
expand: &str
) -> Result<Response<AppUser>, ClientError>
pub async fn get_user( &self, app_id: &str, user_id: &str, expand: &str ) -> Result<Response<AppUser>, ClientError>
Get Assigned User for Application.
This function performs a GET
to the /api/v1/apps/{appId}/users/{userId}
endpoint.
Fetches a specific user assignment for application by id
.
Parameters:
app_id: &str
user_id: &str
expand: &str
sourcepub async fn update_user(
&self,
app_id: &str,
user_id: &str,
body: &AppUser
) -> Result<Response<AppUser>, ClientError>
pub async fn update_user( &self, app_id: &str, user_id: &str, body: &AppUser ) -> Result<Response<AppUser>, ClientError>
Update Application Profile for Assigned User.
This function performs a POST
to the /api/v1/apps/{appId}/users/{userId}
endpoint.
Updates a user’s profile for an application
Parameters:
app_id: &str
user_id: &str
sourcepub async fn delete_user(
&self,
app_id: &str,
user_id: &str,
send_email: bool
) -> Result<Response<()>, ClientError>
pub async fn delete_user( &self, app_id: &str, user_id: &str, send_email: bool ) -> Result<Response<()>, ClientError>
Remove User from Application.
This function performs a DELETE
to the /api/v1/apps/{appId}/users/{userId}
endpoint.
Removes an assignment for a user from an application.
Parameters:
app_id: &str
user_id: &str
send_email: bool