­Home‎ > ‎

Search Records (LIST)


Overview


Returns one or many records on a form based on a query, it allows to filter the records, order, show only certain fields and pagination.
 

URI

/app/api/v1/search


Method

POST


Header

Param

Value

Host

https://app.aeegle.com

Content-type

application/json;charset=UTF-8



Request Parameters

Parameter

Type

Required

Description

authToken

String

True

Valid token

formId

String

True

Id of the form

page

Int

Yes

Pagination, number of pages to show

projections

Array

Optional

Fields to show in the records, if not included then will show all fields.

orders

Array

Optional

Order the records, based on the specified field

filters

Array

Yes

Filter the fields shows in the record, it can be empty

maxResults

Int

Optional

Shows the amount of records specified, according to the requested page.

If -1 is stated then will show all the records




Arrays structure


Orders

Field

Value

Description

field

String

Contains the name of the field that is going to be used to order the records

order

“ASC”-”DESC”

How to order the records

  • ASC: ascendente
  • DESC: descendente

Filters

Field

Value

Description

field

String

Contains the name of the field that is going to be used to filter the records

operator

“EQUALS”-

”NOT_EQUALS”-”LIKE”-

”IN”-

”NOT_IN”

Method to compare the records:

  • EQUALS: cuando el campo es exactamente igual al valor ingresado, se muestra el registro
  • NOT_EQUALS: cuando el registro no contiene el valor ingresado
  • LIKE: cuando el valor ingresado está contenido en los registros buscados
  • IN: para buscar en una lista de valores
  • NOT_IN: excepciones de la lista de valores

value

String

Valor con el que se comparan los registros

condition

“AND”-”OR”

En caso de haber varios filtros, forma de ejecutarlos.

  • AND: para que muestre el resultado de dos filtros
  • OR: para que muestre el resultado de alguno de los dos filtros

Request Body

{
  "authToken": "GzH4Sfas3RbsSQBYmCUuVi+CL7WmBZE916rhg==",
  "formId": "58e708a22353a31bdd16b",
  "query":{    
      "page": 1,
      "projections": [
        "text2039",
        "text2003",
        "text2042"
      ],
      "orders": [],
      "filters": [
         {
                "field": "text2039",
                "condition": "OR, AND",
                "operator": "LIKE, EQUALS, IN, NOT_IN",
                "value":  "value"
         }
       ],
      "maxResults": 15
 } 



Request Result

2017-04-20_1548.png