Module: Slack::Web::Api::Endpoints::AdminApps

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/admin_apps.rb

Instance Method Summary collapse

Instance Method Details

#admin_apps_approve(options = {}) ⇒ Object

Approve an app for installation on a workspace.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :allow_child_auto_install (boolean)

    Auto-create an Admin-Approved App automation rule that pre-approves future child app installs from this manager app.

  • :app_id (string)

    The id of the app to approve.

  • :request_id (string)

    The id of the request to approve.

  • :team_id (Object)

    The ID of the workspace to approve the app on.

  • :enterprise_id (Object)

    The ID of the enterprise to approve the app on.

  • :user_scopes (string)

    User scopes to approve for the app.

  • :bot_scopes (string)

    Bot scopes to approve for the app.

See Also:



28
29
30
# File 'lib/slack/web/api/endpoints/admin_apps.rb', line 28

def admin_apps_approve(options = {})
  post('admin.apps.approve', options)
end

#admin_apps_clearResolution(options = {}) ⇒ Object

Clear an app resolution

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :app_id (string)

    The id of the app whose resolution you want to clear/undo.

  • :team_id (Object)

    The workspace to clear the app resolution from.

  • :enterprise_id (Object)

    The enterprise to clear the app resolution from.

Raises:

  • (ArgumentError)

See Also:



43
44
45
46
# File 'lib/slack/web/api/endpoints/admin_apps.rb', line 43

def admin_apps_clearResolution(options = {})
  raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
  post('admin.apps.clearResolution', options)
end

#admin_apps_restrict(options = {}) ⇒ Object

Restrict an app for installation on a workspace.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :app_id (string)

    The id of the app to restrict.

  • :request_id (string)

    The id of the request to restrict.

  • :team_id (Object)

    The ID of the workspace to approve the app on.

  • :enterprise_id (Object)

    The ID of the enterprise to approve the app on.

See Also:



61
62
63
# File 'lib/slack/web/api/endpoints/admin_apps.rb', line 61

def admin_apps_restrict(options = {})
  post('admin.apps.restrict', options)
end

#admin_apps_uninstall(options = {}) ⇒ Object

Uninstall an app from one or many workspaces, or an entire enterprise organization.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :app_id (string)

    The ID of the app to uninstall.

  • :team_ids (string)

    IDs of the teams to uninstall from (max 100). With an org-level token, this or enterprise_id is required.

  • :enterprise_id (string)

    The enterprise to completely uninstall the application from (across all workspaces). With an org-level token, this or team_ids is required.

Raises:

  • (ArgumentError)

See Also:



76
77
78
79
# File 'lib/slack/web/api/endpoints/admin_apps.rb', line 76

def admin_apps_uninstall(options = {})
  raise ArgumentError, 'Required arguments :app_id missing' if options[:app_id].nil?
  post('admin.apps.uninstall', options)
end