class SignRequestClient::DocumentsSearchApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# 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

documents_search_list(opts = {}) click to toggle source

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
documents_search_list_with_http_info(opts = {}) click to toggle source

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&#x3D;{{query}} *Autocomplete search:* - ?autocomplete&#x3D;{{partial query}} *Search in document name:* - ?name&#x3D;{{query}} *Available (extra) filters:* - ?subdomain&#x3D;{{ team_subdomain }} or use this endpoint with team_subdomain.signrequest.com (when not provided only personal documents are shown) - ?signer_emails&#x3D;{{ signer@email.com }} (will filter documents that an email needed to sign/approve) - ?status&#x3D;{{ si }} - ?who&#x3D;{{ 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&#x3D;se|vi** (sent and viewed). Pagination: - ?page&#x3D;{{ page_number: default 1 }} - ?limit&#x3D;{{ limit results: default 10, max 100 }} Format: By default json is returned, to export data as csv or xls use the format parameter. - ?format&#x3D;csv - ?format&#x3D;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&#39;s found will be exported as columns. To use this mode add the signer_data parameter. - ?format&#x3D;csv&amp;signer_data&#x3D;1 - ?format&#x3D;xls&amp;signer_data&#x3D;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 &#x60;co&#x60;: converting, &#x60;ne&#x60;: new, &#x60;se&#x60;: sent, &#x60;vi&#x60;: viewed, &#x60;si&#x60;: signed, &#x60;do&#x60;: downloaded, &#x60;sd&#x60;: signed and downloaded, &#x60;ca&#x60;: cancelled, &#x60;de&#x60;: declined, &#x60;ec&#x60;: error converting, &#x60;es&#x60;: error sending, &#x60;xp&#x60;: expired @option opts [String] :who &#x60;m&#x60;: only me, &#x60;mo&#x60;: me and others, &#x60;o&#x60;: only others @option opts [String] :format Export format, can be &#x60;json&#x60; (default), &#x60;csv&#x60;, or &#x60;xls&#x60; @option opts [Float] :signer_data Set to &#x60;1&#x60; 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