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
-
#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.
-
#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.
-
#content_source(content_source_id, arguments = {}) ⇒ Object
ContentSources - Retrieves a content source by ID Retrieves a content source by ID.
-
#create_analytics_event(arguments = {}) ⇒ Object
Analytics - Capture click and feedback analytic events Capture Analytic events for click and feedback.
-
#create_batch_synonym_sets(arguments = {}) ⇒ Object
Synonyms - Create a batch of synonym sets Create batched synonym sets.
-
#create_content_source(arguments = {}) ⇒ Object
ContentSources - Create a content source Create a custom content source.
-
#create_external_identity(content_source_id, arguments = {}) ⇒ Object
ExternalIdentities - Adds a new external identity Adds a new external identity.
-
#current_user(arguments = {}) ⇒ Object
getCurrentUser - Get the authenticated user Get the authenticated user.
-
#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.
-
#delete_content_source(content_source_id, arguments = {}) ⇒ Object
ContentSources - Deletes a content source by ID Deletes a content source by ID.
-
#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.
-
#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.
-
#delete_external_identity(content_source_id, arguments = {}) ⇒ Object
ExternalIdentities - Deletes an external identity Deletes an external identity.
-
#delete_synonym_set(arguments = {}) ⇒ Object
Synonyms - Delete a synonym set Delete a synonym set.
-
#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.
-
#external_identity(content_source_id, arguments = {}) ⇒ Object
ExternalIdentities - Retrieves an external identity Retrieves an external identity.
-
#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.
-
#list_content_sources(arguments = {}) ⇒ Object
ContentSources - Retrieves all content sources Retrieves all content sources.
-
#list_documents(content_source_id, arguments = {}) ⇒ Object
Documents - Lists documents from a custom content source Lists documents from a custom content source.
-
#list_external_identities(content_source_id, arguments = {}) ⇒ Object
ExternalIdentities - Retrieves all external identities Retrieves all external identities.
-
#list_synonym_sets(arguments = {}) ⇒ Object
Synonyms - Retrieves all synonym sets Retrieve a list of synonym sets.
-
#put_content_source(content_source_id, arguments = {}) ⇒ Object
ContentSources - Update a content source Update a content source.
-
#put_content_source_icons(content_source_id, arguments = {}) ⇒ Object
ContentSources - Upload content source icons Upload content source icons.
-
#put_external_identity(content_source_id, arguments = {}) ⇒ Object
ExternalIdentities - Updates an external identity Updates an external identity.
-
#put_synonym_set(arguments = {}) ⇒ Object
Synonyms - Update a synonym set Update a synonym set.
-
#put_triggers_blocklist(arguments = {}) ⇒ Object
putTriggersBlocklist - Update current triggers blocklist Update current triggers blocklist.
-
#search(arguments = {}) ⇒ Object
Search - Search across available sources with various query tuning options Issue a Search Query.
-
#synonym_set(arguments = {}) ⇒ Object
Synonyms - Retrieve a synonym set by ID Retrieve a synonym set by ID.
-
#triggers_blocklist(arguments = {}) ⇒ Object
getTriggersBlocklist - Get current triggers blocklist Get current triggers blocklist.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 |