# Run a search Runs a search usng the provided Search Request Endpoint: POST /search Version: v1 Security: apiKeyAuth, bearerAuth ## Header parameters: - `vbasoftware-database` (string, required) Target database ## Request fields (application/json): - `criteria_Key` (integer, required) The unique Criteria_Key that contains the search criteria that will be applied to a SearchConfig. - `searchConfigId` (string, required) The unique id of the SearchConfig for which the Criteria will be applied. - `user_ID` (string,null) Fields to return in the search results. These must be a subset of the SearchConfig Fields. - `page` (integer,null) - `pageCount` (integer,null) - `include_Result_Details` (boolean,null) - `use_Random_Sample` (boolean,null) This flag indicates you want your search to return a random sample or records matching your search criteria. If you flag this as true, Random_Sample_Count must also be a value >= 0 or it will throw an exception. - `random_Sample_Count` (integer,null) This value is the raw count of random records you want as a sample based on your search. Value must be between 0-1000 (because search has paging, this value will default limit to 750 if you do not pass in a larger page size). As noted below, this value must be between 0-100 if you are flagging this as a percent sample. - `random_Sample_Count_Is_Percent` (boolean,null) This flag indicates that the value in Random_Sample_Count is a Percent value between 0-100. If true, the Random_Sample_Count is used as the Pct sample of the full result set. As noted, if this is true, the value in Random_Sample_Count must be between 0-100 or an exception will be thrown. - `use_Nth_Result` (boolean,null) This flag indicates you want your search to return a the Nth result of the results of the search. - `nth_Result` (integer,null) This value is the Nth result you would like returned from the search results. Value must be >= 0 and less than the total number of results. If greater than the total number of results, it will return the last result. - `criterias` (array,null) - `criterias.criteria_Key` (integer) Unique identifier of the Criteria for which this Criteria Details object belongs. When creating a new Critiera object, omit this from the payload. - `criterias.criteria_Seq` (integer, required) The sequential order that the criteria details will be applied. If you have multiple criteria details to add, this is important as it dictates the order in which they are applied and constructed (eg, if you have parenthesis or concatenate with AND's / OR's). - `criterias.criteria_AndOr` (string,null) Specifies the AND/OR when multiple conditions are specified for a criteria. If making a complex query, use this to concatenate multiple criteria. For example, use the value "Or" if you want to match either this criteria or the next criteria. If not needed, use null or omit. - `criterias.criteria_Column` (string,null) Column containing the value for the criteria condition specified, The column within the Criteria_Table for whcih this criteria will be applied. - `criterias.criteria_Data_Type` (string,null) Data type of the value for the criteria condition specified The data type of the column value MUST be populated and MUST be one of the following values: string, date, or number - `criterias.criteria_From_Value` (string,null) First value of a range or only value for a single value of the criteria condition specified The value to use against the Criteria_Operator when comparing values (eg, >, >=, etc). If a Criteria_Operator requires two values (eg, for BETWEEN) then this is the beginning value. If not needed, use null or omit. - `criterias.criteria_Left_Paren` (string,null) Optional field used to hold a parenthesis for nesting criteria conditions Allows you to start a parenthetical expression. Add "(" to start the parenthesis grouping. If not needed, use null or omit. An example of a criteria using parenthesis would be (x=1 OR x=2) OR (y=1 OR y=2). - `criterias.criteria_Operator` (string,null) - `criterias.criteria_Right_Paren` (string,null) Optional field used to hold a parenthesis for nesting criteria conditions Allows you to end a parenthetical expression. Add ")" to end the parenthesis grouping. If not needed, use null or omit. An example of a criteria using parenthesis would be (x=1 OR x=2) OR (y=1 OR y=2). - `criterias.criteria_Table` (string,null) Table where a column for criteria condition is found The table for which this criteria will be applied. The table should exist within the SearchConfig that this criteria is being applied. - `criterias.criteria_Thru_Value` (string,null) Optional ending value of a range for the criteria condition specified If a Criteria_Operator requires two values (eg, for BETWEEN) then this is the ending value. If not needed, use null or omit. - `selectedFields` (array, required) - `selectedFields.tableName` (string, required) Name of the table containing the column. - `selectedFields.columnName` (string, required) Name of the column. - `selectedFields.sortPriority` (integer,null) Identifies the sort priority of the column. If null, the column will not be sorted. - `selectedFields.sortDescending` (boolean,null) Identifies if the column should be sorted in descending order. If null, the column will not be sorted ascending. This will only sort if the SortPriority is provided. ## Response 200 fields (text/plain): - `data` (object) Search results from an executed Search Request. - `data.searchConfigId` (string, required) Identifier for the search that was performed. - `data.criteria_Key` (integer, required) Identifier for the criteria used against this search. - `data.search_SQL_Statement` (string, required) SQL Statement used to generate the search results. - `data.fieldMapping` (array, required) Headers that describe the results contained within the Rows. - `data.fieldMapping.tableName` (string, required) Name of the table from which this value originates, - `data.fieldMapping.columnName` (string, required) Column name from which this value originates. - `data.fieldMapping.columnIndex` (integer, required) Pointer to this value within each of the returned Rows. - `data.results` (array, required) All of the rows returned in the search results. - `error` (object) - `error.detail` (string,null) A human-readable explanation specific to this occurrence of the problem. - `error.instance` (string,null) A URI reference that identifies the specific occurrence of the problem.It may or may not yield further information if dereferenced. - `error.status` (integer) The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem. - `error.title` (string,null) A short, human-readable summary of the problem type.It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization(e.g., using proactive content negotiation; see[RFC7231], Section 3.4). - `error.type` (string,null) A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". - `debug` (object) - `debug.activityID` (string, required) ## Response 401 fields