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 by the collaborators inputted.

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

  • :num_trigger_ids (integer)

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

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

See Also:



34
35
36
37
38
39
40
41
42
# File 'lib/slack/web/api/endpoints/admin_workflows.rb', line 34

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:



51
52
53
54
# File 'lib/slack/web/api/endpoints/admin_workflows.rb', line 51

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