Module: Oktakit::Client::Apps

Included in:
Oktakit::Client
Defined in:
lib/oktakit/client/apps.rb

Instance Method Summary collapse

Instance Method Details

#activate_application(id, options = {}) ⇒ Hash<Sawyer::Resource>

Activate Application

Examples:

Oktakit.activate_application('id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    An empty JSON object {}

See Also:



94
95
96
# File 'lib/oktakit/client/apps.rb', line 94

def activate_application(id, options = {})
  post("/apps/#{id}/lifecycle/activate", options)
end

#add_application(options = {}) ⇒ Hash<Sawyer::Resource>

Add Application

Examples:

Oktakit.add_application

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    All responses return the created Application.

See Also:



15
16
17
# File 'lib/oktakit/client/apps.rb', line 15

def add_application(options = {})
  post('/apps', options)
end

#assign_group_to_application(app_id, group_id, options = {}) ⇒ Hash<Sawyer::Resource>

Assign Group to Application

Examples:

Oktakit.assign_group_to_application('group_id', 'app_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    All responses return the assigned Application Group.

See Also:



243
244
245
# File 'lib/oktakit/client/apps.rb', line 243

def assign_group_to_application(app_id, group_id, options = {})
  put("/apps/#{app_id}/groups/#{group_id}", options)
end

#assign_user_to_application_for_sso(id, options = {}) ⇒ Hash<Sawyer::Resource>

Assign User to Application for SSO

Examples:

Oktakit.assign_user_to_application_for_sso('id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    Application User

See Also:



126
127
128
# File 'lib/oktakit/client/apps.rb', line 126

def assign_user_to_application_for_sso(id, options = {})
  post("/apps/#{id}/users", options)
end

#assign_user_to_application_for_sso_provisioning(id, options = {}) ⇒ Hash<Sawyer::Resource>

Assign User to Application for SSO & Provisioning

Examples:

Oktakit.assign_user_to_application_for_sso_provisioning('id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    Application User with user profile mappings applied

See Also:



142
143
144
# File 'lib/oktakit/client/apps.rb', line 142

def assign_user_to_application_for_sso_provisioning(id, options = {})
  post("/apps/#{id}/users", options)
end

#deactivate_application(id, options = {}) ⇒ Hash<Sawyer::Resource>

Deactivate Application

Examples:

Oktakit.deactivate_application('id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    An empty JSON object {}

See Also:



110
111
112
# File 'lib/oktakit/client/apps.rb', line 110

def deactivate_application(id, options = {})
  post("/apps/#{id}/lifecycle/deactivate", options)
end

#delete_application(id, options = {}) ⇒ Hash<Sawyer::Resource>

Delete Application

Examples:

Oktakit.delete_application('id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    An empty JSON object {}

See Also:



78
79
80
# File 'lib/oktakit/client/apps.rb', line 78

def delete_application(id, options = {})
  delete("/apps/#{id}", options)
end

#generate_new_application_key_credential(app_id, options = {}) ⇒ Hash<Sawyer::Resource>

Generate New Application Key Credential

Examples:

Oktakit.generate_new_application_key_credential('app_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    Return the generated Application Key Credential.

See Also:



309
310
311
# File 'lib/oktakit/client/apps.rb', line 309

def generate_new_application_key_credential(app_id, options = {})
  post("/apps/#{app_id}/credentials/keys/generate", options)
end

#get_application(id, options = {}) ⇒ Hash<Sawyer::Resource>

Get Application

Examples:

Oktakit.get_application('id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    Fetched Application

See Also:



31
32
33
# File 'lib/oktakit/client/apps.rb', line 31

def get_application(id, options = {})
  get("/apps/#{id}", options)
end

#get_assigned_group_for_application(app_id, group_id, options = {}) ⇒ Hash<Sawyer::Resource>

Get Assigned Group for Application

Examples:

Oktakit.get_assigned_group_for_application('group_id', 'app_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    Fetched Application Group

See Also:



260
261
262
# File 'lib/oktakit/client/apps.rb', line 260

def get_assigned_group_for_application(app_id, group_id, options = {})
  get("/apps/#{app_id}/groups/#{group_id}", options)
end

#get_assigned_user_for_application(app_id, user_id, options = {}) ⇒ Hash<Sawyer::Resource>

Get Assigned User for Application

Examples:

Oktakit.get_assigned_user_for_application('user_id', 'app_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    Application User

See Also:



159
160
161
# File 'lib/oktakit/client/apps.rb', line 159

def get_assigned_user_for_application(app_id, user_id, options = {})
  get("/apps/#{app_id}/users/#{user_id}", options)
end

#get_key_credential_for_application(app_id, key_id, options = {}) ⇒ Hash<Sawyer::Resource>

Get Key Credential for Application

Examples:

Oktakit.get_key_credential_for_application('app_id', 'key_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    Application Key Credential.

See Also:



342
343
344
# File 'lib/oktakit/client/apps.rb', line 342

def get_key_credential_for_application(app_id, key_id, options = {})
  get("/apps/#{app_id}/credentials/keys/#{key_id}", options)
end

#list_applications(options = {}) ⇒ Array<Sawyer::Resource>

List Applications

Examples:

Oktakit.list_applications

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Array<Sawyer::Resource>)

    Array of Applications

See Also:



46
47
48
# File 'lib/oktakit/client/apps.rb', line 46

def list_applications(options = {})
  get('/apps', options)
end

#list_groups_assigned_to_application(id, options = {}) ⇒ Array<Sawyer::Resource>

List Groups Assigned to Application

Examples:

Oktakit.list_groups_assigned_to_application('id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Array<Sawyer::Resource>)

    Array of Application Groups

See Also:



276
277
278
# File 'lib/oktakit/client/apps.rb', line 276

def list_groups_assigned_to_application(id, options = {})
  get("/apps/#{id}/groups", options)
end

#list_key_credentials_for_application(app_id, options = {}) ⇒ Array<Sawyer::Resource>

List Key Credentials for Application

Examples:

Oktakit.list_key_credentials_for_application('app_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Array<Sawyer::Resource>)

    Array of Application Key Credential.

See Also:



325
326
327
# File 'lib/oktakit/client/apps.rb', line 325

def list_key_credentials_for_application(app_id, options = {})
  get("/apps/#{app_id}/credentials/keys", options)
end

#list_users_assigned_to_application(id, options = {}) ⇒ Array<Sawyer::Resource>

List Users Assigned to Application

Examples:

Oktakit.list_users_assigned_to_application('id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Array<Sawyer::Resource>)

    Array of Application Users

See Also:



175
176
177
# File 'lib/oktakit/client/apps.rb', line 175

def list_users_assigned_to_application(id, options = {})
  get("/apps/#{id}/users", options)
end

#preview_saml_metadata_for_application(app_id, options = {}) ⇒ Hash<Sawyer::Resource>

Preview SAML metadata for Application

Examples:

Oktakit.('app_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    SAML metadata in XML

See Also:



358
359
360
# File 'lib/oktakit/client/apps.rb', line 358

def (app_id, options = {})
  get("/apps/#{app_id}/sso/saml/metadata", options)
end

#remove_group_from_application(app_id, group_id, options = {}) ⇒ Hash<Sawyer::Resource>

Remove Group from Application

Examples:

Oktakit.remove_group_from_application('group_id', 'app_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    An empty JSON object {}

See Also:



293
294
295
# File 'lib/oktakit/client/apps.rb', line 293

def remove_group_from_application(app_id, group_id, options = {})
  delete("/apps/#{app_id}/groups/#{group_id}", options)
end

#remove_user_from_application(app_id, user_id, options = {}) ⇒ Hash<Sawyer::Resource>

Remove User from Application

Examples:

Oktakit.remove_user_from_application('user_id', 'app_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    An empty JSON object {}

See Also:



226
227
228
# File 'lib/oktakit/client/apps.rb', line 226

def remove_user_from_application(app_id, user_id, options = {})
  delete("/apps/#{app_id}/users/#{user_id}", options)
end

#update_application(id, options = {}) ⇒ Hash<Sawyer::Resource>

Update Application

Examples:

Oktakit.update_application('id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    Updated Application

See Also:



62
63
64
# File 'lib/oktakit/client/apps.rb', line 62

def update_application(id, options = {})
  put("/apps/#{id}", options)
end

#update_application_credentials_for_assigned_user(app_id, user_id, options = {}) ⇒ Hash<Sawyer::Resource>

Update Application Credentials for Assigned User

Examples:

Oktakit.update_application_credentials_for_assigned_user('user_id', 'app_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    Application User

See Also:



192
193
194
# File 'lib/oktakit/client/apps.rb', line 192

def update_application_credentials_for_assigned_user(app_id, user_id, options = {})
  post("/apps/#{app_id}/users/#{user_id}", options)
end

#update_application_profile_for_assigned_user(app_id, user_id, options = {}) ⇒ Hash<Sawyer::Resource>

Update Application Profile for Assigned User

Examples:

Oktakit.update_application_profile_for_assigned_user('user_id', 'app_id')

Parameters:

  • options (:query) (defaults to: {})
    Hash

    Optional. Query params for request

  • options (:headers) (defaults to: {})
    Hash

    Optional. Header params for the request.

  • options (:accept) (defaults to: {})
    String

    Optional. The content type to accept. Default application/json

  • options (:content_type) (defaults to: {})
    String

    Optional. The content type for the request. Default application/json

  • options (Hash) (defaults to: {})

    Optional. Body params for request.

Returns:

  • (Hash<Sawyer::Resource>)

    Application User with user profile mappings applied

See Also:



209
210
211
# File 'lib/oktakit/client/apps.rb', line 209

def update_application_profile_for_assigned_user(app_id, user_id, options = {})
  post("/apps/#{app_id}/users/#{user_id}", options)
end