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):

  • :app_id (Object)

    The parent app ID for which to return workflows.

  • :collaborator_ids (array)

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

  • :cursor (string)

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

  • :is_sales_elevate (boolean)

    Filter workflows by their Sales Elevate status.

  • :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.

  • :num_trigger_ids (integer)

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

  • :query (string)

    A search query to filter for workflow name or description.

  • :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).

  • :source (enum)

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

  • :trigger_type_id (string)

    Only include workflows with this trigger type.

See Also:



38
39
40
41
42
43
44
45
46
# File 'lib/slack/web/api/endpoints/admin_workflows.rb', line 38

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:



55
56
57
58
# File 'lib/slack/web/api/endpoints/admin_workflows.rb', line 55

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