class SignRequestClient::DocumentsSearchApi
Attributes
Public Class Methods
# File lib/signrequest_client/api/documents_search_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Search documents Search interface for fast (autocomplete) searching of documents. This can be useful to have your users search for a document in your interface. Document
names are tokenized on whitespace, hyphens and underscores to also match partial document names. *Normal search:* - ?q={{query}} *Autocomplete search:* - ?autocomplete={{partial query}} *Search in document name:* - ?name={{query}} *Available (extra) filters:* - ?subdomain={{ team_subdomain }} or use this endpoint with team_subdomain.signrequest.com (when not provided only personal documents are shown) - ?signer_emails={{ signer@email.com }} (will filter documents that an email needed to sign/approve) - ?status={{ si }} - ?who={{ mo }} To include multiple values for a filter field separate the values with a pipe (|). For example to only search for completed documents use **status=se|vi** (sent and viewed). Pagination: - ?page={{ page_number: default 1 }} - ?limit={{ limit results: default 10, max 100 }} Format: By default json is returned, to export data as csv or xls use the format parameter. - ?format=csv - ?format=xls For csv and xls the data can also be exported with each signer on a separate row. In this mode also the signer inputs that have an external_id specified on a tag will be exported. All external_id's found will be exported as columns. To use this mode add the signer_data parameter. - ?format=csv&signer_data=1 - ?format=xls&signer_data=1 Note that all documents are only ordered by created (newest first) when q, autocomplete or name are not used, else they are ordered by the strenght of the match. @param [Hash] opts the optional parameters @option opts [Integer] :page A page number within the paginated result set. @option opts [Integer] :limit Number of results to return per page. @option opts [String] :q Normal search query @option opts [String] :autocomplete Partial search query @option opts [String] :name Document
name @option opts [String] :subdomain @option opts [String] :signer_emails Email needed to sign/approve @option opts [String] :status `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired @option opts [String] :who `m`: only me, `mo`: me and others, `o`: only others @option opts [String] :format Export format, can be `json` (default), `csv`, or `xls` @option opts [Float] :signer_data Set to `1` to export with each signer on a separate row @return [InlineResponse2002]
# File lib/signrequest_client/api/documents_search_api.rb, line 37 def documents_search_list(opts = {}) data, _status_code, _headers = documents_search_list_with_http_info(opts) data end
Search documents Search interface for fast (autocomplete) searching of documents. This can be useful to have your users search for a document in your interface. Document
names are tokenized on whitespace, hyphens and underscores to also match partial document names. *Normal search:* - ?q={{query}} *Autocomplete search:* - ?autocomplete={{partial query}} *Search in document name:* - ?name={{query}} *Available (extra) filters:* - ?subdomain={{ team_subdomain }} or use this endpoint with team_subdomain.signrequest.com (when not provided only personal documents are shown) - ?signer_emails={{ signer@email.com }} (will filter documents that an email needed to sign/approve) - ?status={{ si }} - ?who={{ mo }} To include multiple values for a filter field separate the values with a pipe (|). For example to only search for completed documents use **status=se|vi** (sent and viewed). Pagination: - ?page={{ page_number: default 1 }} - ?limit={{ limit results: default 10, max 100 }} Format: By default json is returned, to export data as csv or xls use the format parameter. - ?format=csv - ?format=xls For csv and xls the data can also be exported with each signer on a separate row. In this mode also the signer inputs that have an external_id specified on a tag will be exported. All external_id's found will be exported as columns. To use this mode add the signer_data parameter. - ?format=csv&signer_data=1 - ?format=xls&signer_data=1 Note that all documents are only ordered by created (newest first) when q, autocomplete or name are not used, else they are ordered by the strenght of the match. @param [Hash] opts the optional parameters @option opts [Integer] :page A page number within the paginated result set. @option opts [Integer] :limit Number of results to return per page. @option opts [String] :q Normal search query @option opts [String] :autocomplete Partial search query @option opts [String] :name Document
name @option opts [String] :subdomain @option opts [String] :signer_emails Email needed to sign/approve @option opts [String] :status `co`: converting, `ne`: new, `se`: sent, `vi`: viewed, `si`: signed, `do`: downloaded, `sd`: signed and downloaded, `ca`: cancelled, `de`: declined, `ec`: error converting, `es`: error sending, `xp`: expired @option opts [String] :who `m`: only me, `mo`: me and others, `o`: only others @option opts [String] :format Export format, can be `json` (default), `csv`, or `xls` @option opts [Float] :signer_data Set to `1` to export with each signer on a separate row @return [Array<(InlineResponse2002
, Fixnum, Hash)>] InlineResponse2002
data, response status code and response headers
# File lib/signrequest_client/api/documents_search_api.rb, line 57 def documents_search_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentsSearchApi.documents_search_list ...' end # resource path local_var_path = '/documents-search/' # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'autocomplete'] = opts[:'autocomplete'] if !opts[:'autocomplete'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'subdomain'] = opts[:'subdomain'] if !opts[:'subdomain'].nil? query_params[:'signer_emails'] = opts[:'signer_emails'] if !opts[:'signer_emails'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'who'] = opts[:'who'] if !opts[:'who'].nil? query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil? query_params[:'signer_data'] = opts[:'signer_data'] if !opts[:'signer_data'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.ms-excel']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Token'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse2002') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentsSearchApi#documents_search_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end