Skip to main content

./list/autocomplete (post)

Provides field auto-completion functionality.

Fields with property canautocomplete equals true support this functionality. Get the list of all fields for this information.

URL

(POST) ./list/autocomplete/{field}

PARAMETERS

URL parameters are optional:

field

The field ID to auto-complete.

You can also specify the field in the body JSON, see below.

If you do not specify the "field" in any place, the system chooses a default (first auto complete enabled field)

Optional, string?

 

Request body parameters are JSON formatted:

prefixThe text to auto-complete. The text must contain at least 1 character.Mandatory, string
field

The field ID to auto-complete.

Drop parameter to query the default auto-completion field.

Optional, string?
skipOptional. Used with paginating auto-completion results. Default: 0Optional, int?
takeOptional. The maximum amount of items to retrieve. Default: 15. Maximum: 100.Optional, int?

 

RESULTS

The method returns a JSON array of matching elements. Each element has these properties:

vThe objects "id" which is the primary key.string or int
t

The matched text.

object[]
*

Other properties may be added depending on the specific list implementation.

For example, a jobs list may add

?

 

WHICH FIELDS SUPPORT AUTO-COMPLETION?

Proceed as follows:

  1. Use API method ./list/fields to retrieve all fields with their properties
  2. Find the fields with property "canautocomplete": true

 

EXAMPLES

Request for auto-completing job references. By default it queries job references.

CODE
./list/autocomplete
BODY: { "prefix": "ana" }

Result:

CODE
[
        {
            "t": "anaka-220",
            "v": "c6415"
        },
        {
            "t": "anami",
            "v": "c6416"
        },
        {
            "t": "anaxon",
            "v": "c6417"
        }
]
 

 

Do an auto-complete on the company name:

CODE
/companies/list/autocomplete/name
BODY: { "prefix": "ana" }

 

 

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.