Module: Slack::Web::Api::Endpoints::AdminWorkflows

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

Instance Method Summary collapse

Instance Method Details

#admin_workflows_search(options = {}) ⇒ Object

Search workflows within the team or enterprise

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :query (string) —

    A search query to filter for workflow name or description.

  • :app_id (Object) —

    The parent app ID for which to return workflows.

  • :cursor (string) —

    Set cursor to next_cursor returned by the previous call to list items in the next page.

  • :limit (integer) —

    The number of results that will be returned by the API on each invocation.

  • :no_collaborators (boolean) —

    Only include workflows with no collaborators in the result; default is false.

  • :collaborator_ids (array) —

    Only include workflows where all of the provided user IDs are a manager/collaborator of that workflow.

  • :num_trigger_ids (integer) —

    Number of trigger IDs to fetch for each workflow; default is 10.

  • :is_sales_elevate (boolean) —

    Filter workflows by their Sales Elevate status.

  • :source (enum) —

    Source of workflow creation, either from code or workflow builder.

  • :sort (enum) —

    The field used to sort the returned workflows.

  • :sort_dir (enum) —

    Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).

  • :trigger_type_id (string) —

    Only include workflows with this trigger type.

  • :publish_status (enum) —

    Filter workflows by their published status.

  • :step_function_ids (array) —

    Only include workflows that use all of the provided step function ids.

See Also:



42
43
44
45
46
47
48
49
50
# File 'lib/slack/web/api/endpoints/admin_workflows.rb', line 42

def admin_workflows_search(options = {})
  if block_given?
    Pagination::Cursor.new(self, :admin_workflows_search, options).each do |page|
      yield page
    end
  else
    post('admin.workflows.search', options)
  end
end

#admin_workflows_unpublish(options = {}) ⇒ Object

Unpublish workflows within the team or enterprise

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :workflow_ids (array) —

    Array of workflow IDs to unpublish.

Raises:

  • (ArgumentError)

See Also:



59
60
61
62
# File 'lib/slack/web/api/endpoints/admin_workflows.rb', line 59

def admin_workflows_unpublish(options = {})
  raise ArgumentError, 'Required arguments :workflow_ids missing' if options[:workflow_ids].nil?
  post('admin.workflows.unpublish', options)
end