Skip to main content

Custom URL Picker API (0.1.0)

A Custom URL Picker is a picker that can be used inside Witboost templates to ask information to end users through a drop-down menu.

The options of the drop-down menu can be supplied by a microservice implementing this Custom URL Picker API specification.

The microservice will be called by the Custom URL Picker to get the options to show to the user in the drop-down list on the UI. The user can filter out results by typing in the Custom URL Picker field. The microservice will return the first limit elements that match the filter, skipping the first offset elements.

CustomUrlPicker

Retrieve drop-down list options

Called by the Custom URL Picker to get the options to show to the user in the drop-down list on the UI.

The user can filter out results by typing in the Custom URL Picker field. The microservice will return the first limit elements that match the filter, skipping the first offset elements.

query Parameters
filter
string
Example: filter=banana

The user input, that is typed by the user on the UI field, which is used to filter the values on the glossary.

If not provided, the microservice will return all the values in the glossary following the pagination settings.

offset
required
number
Example: offset=0

the number of values to skip for each request

limit
required
number >= 5
Example: limit=5

the number of values to return at each request

Request Body schema: application/json
optional

A free-form object that can be used to define additional properties to use while performing a search in the glossary. This can be filled with other fields values coming from the template.

object

Responses

Request samples

Content type
application/json
{
  • "kind": "fruit"
}

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Validate a selected option against the glossary

Called by the Custom URL picker to validate the selected values against the ones included in the glossary e.g. for checking if the selected values are still present in the glossary.

This API gets called when the user wants to modify some values e.g. by using the Edit Template, and a check is being run to see if the previously selected value is still present in the glossary with the exact shape.

Request Body schema: application/json
required
Array of objects (SelectedObject)

the selected options to validate

queryParameters
object

This field represents additional parameters to put in the request body. The user can use it to define additional properties to use while performing a validation on the "selectedObject".

Responses

Request samples

Content type
application/json
{
  • "selectedObjects": [
    ],
  • "queryParameters": {
    }
}

Response samples

Content type
application/json
"Validation succeded"