Module: Elastic::EnterpriseSearch::WorkplaceSearch::Actions

Included in:
Client
Defined in:
lib/elastic/workplace-search/api/search.rb,
lib/elastic/workplace-search/api/document.rb,
lib/elastic/workplace-search/api/synonym_set.rb,
lib/elastic/workplace-search/api/current_user.rb,
lib/elastic/workplace-search/api/content_source.rb,
lib/elastic/workplace-search/api/list_documents.rb,
lib/elastic/workplace-search/api/index_documents.rb,
lib/elastic/workplace-search/api/put_synonym_set.rb,
lib/elastic/workplace-search/api/delete_documents.rb,
lib/elastic/workplace-search/api/command_sync_jobs.rb,
lib/elastic/workplace-search/api/external_identity.rb,
lib/elastic/workplace-search/api/list_synonym_sets.rb,
lib/elastic/workplace-search/api/delete_synonym_set.rb,
lib/elastic/workplace-search/api/put_content_source.rb,
lib/elastic/workplace-search/api/triggers_blocklist.rb,
lib/elastic/workplace-search/api/delete_all_documents.rb,
lib/elastic/workplace-search/api/list_content_sources.rb,
lib/elastic/workplace-search/api/create_content_source.rb,
lib/elastic/workplace-search/api/delete_content_source.rb,
lib/elastic/workplace-search/api/put_external_identity.rb,
lib/elastic/workplace-search/api/create_analytics_event.rb,
lib/elastic/workplace-search/api/put_triggers_blocklist.rb,
lib/elastic/workplace-search/api/create_external_identity.rb,
lib/elastic/workplace-search/api/delete_external_identity.rb,
lib/elastic/workplace-search/api/list_external_identities.rb,
lib/elastic/workplace-search/api/put_content_source_icons.rb,
lib/elastic/workplace-search/api/create_batch_synonym_sets.rb,
lib/elastic/workplace-search/api/delete_documents_by_query.rb,
lib/elastic/workplace-search/api/auto_query_refinement_details.rb

Instance Method Summary collapse

Instance Method Details

#auto_query_refinement_details(content_source_id, arguments = {}) ⇒ Object

ContentSources - Retrieves a content source’s automatic query refinement details Retrieves a content source’s automatic query refinement details

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/elastic/workplace-search/api/auto_query_refinement_details.rb', line 33

def auto_query_refinement_details(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id

  headers = arguments.delete(:headers) || {}
  request(
    :get,
    "api/ws/v1/sources/#{content_source_id}/automatic_query_refinement/",
    arguments,
    nil,
    headers
  )
end

#command_sync_jobs(content_source_id, arguments = {}) ⇒ Object

SyncJobs - Issue commands to a Content Source’s sync jobs Control a content source’s sync jobs

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :job_type (Array)

    The type of sync job to consider

  • :body (Any of: <Hash> - Command to start a synchronisation job for Content Source (force_interrupt<boolean>, command<string>) or <Hash> - Command to interrupt a synchronisation job for Content Source (command<string>))

    Required

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/elastic/workplace-search/api/command_sync_jobs.rb', line 35

def command_sync_jobs(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
  raise ArgumentError, "Required parameter 'body' missing" unless arguments[:body]

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :post,
    "api/ws/v1/sources/#{content_source_id}/sync/jobs/",
    arguments,
    body,
    headers
  )
end

#content_source(content_source_id, arguments = {}) ⇒ Object

ContentSources - Retrieves a content source by ID Retrieves a content source by ID

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/elastic/workplace-search/api/content_source.rb', line 33

def content_source(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id

  headers = arguments.delete(:headers) || {}
  request(
    :get,
    "api/ws/v1/sources/#{content_source_id}/",
    arguments,
    nil,
    headers
  )
end

#create_analytics_event(arguments = {}) ⇒ Object

Analytics - Capture click and feedback analytic events Capture Analytic events for click and feedback

Parameters:

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

    endpoint arguments

  • access_token (String)

    OAuth Access Token (Required)

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash) — default: Required: type, query_id, page, content_source_id, document_id, rank
  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/elastic/workplace-search/api/create_analytics_event.rb', line 42

def create_analytics_event(arguments = {})
  raise ArgumentError, "Required parameter 'access_token' missing" unless arguments[:access_token]

  unless arguments[:body]
    raise ArgumentError,
          "Required parameter 'body (type,query_id,page,content_source_id,document_id,rank)' missing"
  end

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :post,
    'api/ws/v1/analytics/event/',
    arguments,
    body,
    headers
  )
end

#create_batch_synonym_sets(arguments = {}) ⇒ Object

Synonyms - Create a batch of synonym sets Create batched synonym sets

Parameters:

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elastic/workplace-search/api/create_batch_synonym_sets.rb', line 35

def create_batch_synonym_sets(arguments = {})
  raise ArgumentError, "Required parameter 'body' missing" unless arguments[:body]

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :post,
    'api/ws/v1/synonyms/',
    arguments,
    body,
    headers
  )
end

#create_content_source(arguments = {}) ⇒ Object

ContentSources - Create a content source Create a custom content source

Parameters:

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash) — default: Required: name
  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/elastic/workplace-search/api/create_content_source.rb', line 40

def create_content_source(arguments = {})
  raise ArgumentError, "Required parameter 'body (name)' missing" unless arguments[:body]

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :post,
    'api/ws/v1/sources/',
    arguments,
    body,
    headers
  )
end

#create_external_identity(content_source_id, arguments = {}) ⇒ Object

ExternalIdentities - Adds a new external identity Adds a new external identity

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash) — default: Required: external_user_id, external_user_properties, permissions
  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/elastic/workplace-search/api/create_external_identity.rb', line 37

def create_external_identity(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id

  unless arguments[:body]
    raise ArgumentError,
          "Required parameter 'body (external_user_id,external_user_properties,permissions)' missing"
  end

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :post,
    "api/ws/v1/sources/#{content_source_id}/external_identities/",
    arguments,
    body,
    headers
  )
end

#current_user(arguments = {}) ⇒ Object

getCurrentUser - Get the authenticated user Get the authenticated user

Parameters:

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

    endpoint arguments

Options Hash (arguments):

  • :headers (Hash)

    optional HTTP headers to send with the request

See Also:



32
33
34
35
36
37
38
39
40
41
# File 'lib/elastic/workplace-search/api/current_user.rb', line 32

def current_user(arguments = {})
  headers = arguments.delete(:headers) || {}
  request(
    :get,
    'api/ws/v1/whoami/',
    arguments,
    nil,
    headers
  )
end

#delete_all_documents(content_source_id, arguments = {}) ⇒ Object

Documents - Deletes all documents in a custom content source Deletes all documents in a custom content source

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/elastic/workplace-search/api/delete_all_documents.rb', line 33

def delete_all_documents(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id

  headers = arguments.delete(:headers) || {}

  request(
    :delete,
    "api/ws/v1/sources/#{content_source_id}/documents/",
    arguments,
    {},
    headers
  )
end

#delete_content_source(content_source_id, arguments = {}) ⇒ Object

ContentSources - Deletes a content source by ID Deletes a content source by ID

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/elastic/workplace-search/api/delete_content_source.rb', line 33

def delete_content_source(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id

  headers = arguments.delete(:headers) || {}
  request(
    :delete,
    "api/ws/v1/sources/#{content_source_id}/",
    arguments,
    nil,
    headers
  )
end

#delete_documents(content_source_id, arguments = {}) ⇒ Object

Documents - Deletes a list of documents from a custom content source Remove documents from a Custom API Source

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :document_ids (Array<String>)

    Required

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elastic/workplace-search/api/delete_documents.rb', line 34

def delete_documents(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
  raise ArgumentError, "Required parameter 'document_ids' missing" unless arguments[:document_ids]

  document_ids = arguments.delete(:document_ids) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :post,
    "api/ws/v1/sources/#{content_source_id}/documents/bulk_destroy/",
    arguments,
    document_ids,
    headers
  )
end

#delete_documents_by_query(content_source_id, arguments = {}) ⇒ Object

Documents - Deletes documents by query in a custom content source Deletes documents by query in a custom content source

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)
  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elastic/workplace-search/api/delete_documents_by_query.rb', line 35

def delete_documents_by_query(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :delete,
    "api/ws/v1/sources/#{content_source_id}/documents/",
    arguments,
    body,
    headers
  )
end

#delete_external_identity(content_source_id, arguments = {}) ⇒ Object

ExternalIdentities - Deletes an external identity Deletes an external identity

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :external_user_id (String)

    Unique identifier of an external user, such as username or email address. (Required)

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elastic/workplace-search/api/delete_external_identity.rb', line 34

def delete_external_identity(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
  raise ArgumentError, "Required parameter 'external_user_id' missing" unless arguments[:external_user_id]

  external_user_id = arguments.delete(:external_user_id)
  headers = arguments.delete(:headers) || {}
  request(
    :delete,
    "api/ws/v1/sources/#{content_source_id}/external_identities/#{external_user_id}/",
    arguments,
    nil,
    headers
  )
end

#delete_synonym_set(arguments = {}) ⇒ Object

Synonyms - Delete a synonym set Delete a synonym set

Parameters:

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

    endpoint arguments

Options Hash (arguments):

  • :synonym_set_id (String)

    Synonym Set ID (Required)

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/elastic/workplace-search/api/delete_synonym_set.rb', line 33

def delete_synonym_set(arguments = {})
  raise ArgumentError, "Required parameter 'synonym_set_id' missing" unless arguments[:synonym_set_id]

  synonym_set_id = arguments.delete(:synonym_set_id)
  headers = arguments.delete(:headers) || {}
  request(
    :delete,
    "api/ws/v1/synonyms/#{synonym_set_id}/",
    arguments,
    nil,
    headers
  )
end

#document(content_source_id, arguments = {}) ⇒ Object

Documents - Retrieves a document by ID from the specified content source Retrieves a document by ID from the specified content source

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :document_id (String)

    Unique ID for a content source document. Provided upon or returned at creation. (Required)

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elastic/workplace-search/api/document.rb', line 34

def document(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
  raise ArgumentError, "Required parameter 'document_id' missing" unless arguments[:document_id]

  document_id = arguments.delete(:document_id)
  headers = arguments.delete(:headers) || {}
  request(
    :get,
    "api/ws/v1/sources/#{content_source_id}/documents/#{document_id}/",
    arguments,
    nil,
    headers
  )
end

#external_identity(content_source_id, arguments = {}) ⇒ Object

ExternalIdentities - Retrieves an external identity Retrieves an external identity

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :external_user_id (String)

    Unique identifier of an external user, such as username or email address. (Required)

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elastic/workplace-search/api/external_identity.rb', line 34

def external_identity(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
  raise ArgumentError, "Required parameter 'external_user_id' missing" unless arguments[:external_user_id]

  external_user_id = arguments.delete(:external_user_id)
  headers = arguments.delete(:headers) || {}
  request(
    :get,
    "api/ws/v1/sources/#{content_source_id}/external_identities/#{external_user_id}/",
    arguments,
    nil,
    headers
  )
end

#index_documents(content_source_id, arguments = {}) ⇒ Object

Documents - Indexes one or more new documents into a custom content source, or updates one or more existing documents Indexes one or more new documents into a custom content source, or updates one or more existing documents

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :documents (Array<Hash> { id: [] }, { last_updated: [] }, { _allow_permissions: [] }, { _deny_permissions: [] })

    Required

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elastic/workplace-search/api/index_documents.rb', line 34

def index_documents(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
  raise ArgumentError, "Required parameter 'documents' missing" unless arguments[:documents]

  documents = arguments.delete(:documents) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :post,
    "api/ws/v1/sources/#{content_source_id}/documents/bulk_create/",
    arguments,
    documents,
    headers
  )
end

#list_content_sources(arguments = {}) ⇒ Object

ContentSources - Retrieves all content sources Retrieves all content sources

Parameters:

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

    endpoint arguments

Options Hash (arguments):

  • :current_page (Integer)

    Which page of results to request

  • :page_size (Integer)

    The number of results to return in a page

  • :headers (Hash)

    optional HTTP headers to send with the request

See Also:



34
35
36
37
38
39
40
41
42
43
# File 'lib/elastic/workplace-search/api/list_content_sources.rb', line 34

def list_content_sources(arguments = {})
  headers = arguments.delete(:headers) || {}
  request(
    :get,
    'api/ws/v1/sources/',
    arguments,
    nil,
    headers
  )
end

#list_documents(content_source_id, arguments = {}) ⇒ Object

Documents - Lists documents from a custom content source Lists documents from a custom content source

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)
  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/elastic/workplace-search/api/list_documents.rb', line 38

def list_documents(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :post,
    "api/ws/v1/sources/#{content_source_id}/documents/",
    arguments,
    body,
    headers
  )
end

#list_external_identities(content_source_id, arguments = {}) ⇒ Object

ExternalIdentities - Retrieves all external identities Retrieves all external identities

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

Options Hash (arguments):

  • :current_page (Integer)

    Which page of results to request

  • :page_size (Integer)

    The number of results to return in a page

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/elastic/workplace-search/api/list_external_identities.rb', line 35

def list_external_identities(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id

  headers = arguments.delete(:headers) || {}
  request(
    :get,
    "api/ws/v1/sources/#{content_source_id}/external_identities/",
    arguments,
    nil,
    headers
  )
end

#list_synonym_sets(arguments = {}) ⇒ Object

Synonyms - Retrieves all synonym sets Retrieve a list of synonym sets

Parameters:

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)
  • :headers (Hash)

    optional HTTP headers to send with the request

See Also:



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/elastic/workplace-search/api/list_synonym_sets.rb', line 36

def list_synonym_sets(arguments = {})
  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :get,
    'api/ws/v1/synonyms/',
    arguments,
    body,
    headers
  )
end

#put_content_source(content_source_id, arguments = {}) ⇒ Object

ContentSources - Update a content source Update a content source

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash) — default: Required: name, is_searchable
  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/elastic/workplace-search/api/put_content_source.rb', line 41

def put_content_source(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
  raise ArgumentError, "Required parameter 'body (name,is_searchable)' missing" unless arguments[:body]

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :put,
    "api/ws/v1/sources/#{content_source_id}/",
    arguments,
    body,
    headers
  )
end

#put_content_source_icons(content_source_id, arguments = {}) ⇒ Object

ContentSources - Upload content source icons Upload content source icons

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/elastic/workplace-search/api/put_content_source_icons.rb', line 36

def put_content_source_icons(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
  raise ArgumentError, "Required parameter 'body' missing" unless arguments[:body]

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :put,
    "api/ws/v1/sources/#{content_source_id}/icon/",
    arguments,
    body,
    headers
  )
end

#put_external_identity(content_source_id, arguments = {}) ⇒ Object

ExternalIdentities - Updates an external identity Updates an external identity

Parameters:

  • content_source_id (String)

    Unique ID for a Custom API source, provided upon creation of a Custom API Source (Required)

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :external_user_id (String)

    Unique identifier of an external user, such as username or email address. (Required)

  • :body (Hash) — default: Required: external_user_id
  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elastic/workplace-search/api/put_external_identity.rb', line 38

def put_external_identity(content_source_id, arguments = {})
  raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
  raise ArgumentError, "Required parameter 'external_user_id' missing" unless arguments[:external_user_id]
  raise ArgumentError, "Required parameter 'body (external_user_id)' missing" unless arguments[:body]

  external_user_id = arguments.delete(:external_user_id)
  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :put,
    "api/ws/v1/sources/#{content_source_id}/external_identities/#{external_user_id}/",
    arguments,
    body,
    headers
  )
end

#put_synonym_set(arguments = {}) ⇒ Object

Synonyms - Update a synonym set Update a synonym set

Parameters:

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :synonym_set_id (String)

    Synonym Set ID (Required)

  • :body (Hash) — default: Required: synonyms
  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/elastic/workplace-search/api/put_synonym_set.rb', line 35

def put_synonym_set(arguments = {})
  raise ArgumentError, "Required parameter 'synonym_set_id' missing" unless arguments[:synonym_set_id]
  raise ArgumentError, "Required parameter 'body (synonyms)' missing" unless arguments[:body]

  synonym_set_id = arguments.delete(:synonym_set_id)
  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :put,
    "api/ws/v1/synonyms/#{synonym_set_id}/",
    arguments,
    body,
    headers
  )
end

#put_triggers_blocklist(arguments = {}) ⇒ Object

putTriggersBlocklist - Update current triggers blocklist Update current triggers blocklist

Parameters:

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

    endpoint arguments

Options Hash (arguments):

  • :headers (Hash)

    optional HTTP headers to send with the request

See Also:



32
33
34
35
36
37
38
39
40
41
# File 'lib/elastic/workplace-search/api/put_triggers_blocklist.rb', line 32

def put_triggers_blocklist(arguments = {})
  headers = arguments.delete(:headers) || {}
  request(
    :put,
    'api/ws/v1/automatic_query_refinement/',
    arguments,
    nil,
    headers
  )
end

#search(arguments = {}) ⇒ Object

Search - Search across available sources with various query tuning options Issue a Search Query

Parameters:

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

    endpoint arguments

  • access_token (String)

    OAuth Access Token (Required)

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash)

    Required

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/elastic/workplace-search/api/search.rb', line 46

def search(arguments = {})
  raise ArgumentError, "Required parameter 'access_token' missing" unless arguments[:access_token]
  raise ArgumentError, "Required parameter 'body' missing" unless arguments[:body]

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :post,
    'api/ws/v1/search/',
    arguments,
    body,
    headers
  )
end

#synonym_set(arguments = {}) ⇒ Object

Synonyms - Retrieve a synonym set by ID Retrieve a synonym set by ID

Parameters:

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

    endpoint arguments

Options Hash (arguments):

  • :synonym_set_id (String)

    Synonym Set ID (Required)

  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/elastic/workplace-search/api/synonym_set.rb', line 33

def synonym_set(arguments = {})
  raise ArgumentError, "Required parameter 'synonym_set_id' missing" unless arguments[:synonym_set_id]

  synonym_set_id = arguments.delete(:synonym_set_id)
  headers = arguments.delete(:headers) || {}
  request(
    :get,
    "api/ws/v1/synonyms/#{synonym_set_id}/",
    arguments,
    nil,
    headers
  )
end

#triggers_blocklist(arguments = {}) ⇒ Object

getTriggersBlocklist - Get current triggers blocklist Get current triggers blocklist

Parameters:

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

    endpoint arguments

Options Hash (arguments):

  • :headers (Hash)

    optional HTTP headers to send with the request

See Also:



32
33
34
35
36
37
38
39
40
41
# File 'lib/elastic/workplace-search/api/triggers_blocklist.rb', line 32

def triggers_blocklist(arguments = {})
  headers = arguments.delete(:headers) || {}
  request(
    :get,
    'api/ws/v1/automatic_query_refinement/',
    arguments,
    nil,
    headers
  )
end