Skip to content

Search for field options

Request

Create a new FieldOptionSearch

The most commmon uses of an FieldOptionSearch is to retrieve the FieldOption resources for an Field using the FIELD_ID field criterion. When Field.hierarchical = true it is recommended to retrieve each level of the tree via a separate search using PARENT_ID field criteria.

Security
bearerToken
Bodyapplication/jsonrequired
fromintegerrequired

The item number to begin the result set from

Default:0
Example:0
pageSizeinteger, [ 0 .. 1000 ]required

The maximum number of items to return in the result set.

Default:100
Example:100
criterionanyrequired
sortsArray of objectsrequired

Sorts to be applied to the search in order of precedence

curl -i -X POST \
  https://api-v2.dash.app/field-option-searches \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "from": 0,
    "pageSize": 100,
    "criterion": {
      "type": "AND",
      "criteria": [
        {
          "type": "FIELD_EQUALS",
          "field": "FIELD_ID",
          "value": "a52b5315-15b8-417f-b742-d6902108bac1"
        },
        {
          "type": "FIELD_IS_EMPTY",
          "field": "PARENT_ID"
        }
      ]
    },
    "sorts": [
      {
        "field": "POSITION",
        "order": "ASC"
      }
    ]
  }'

Responses

Success

Bodyapplication/json
resultsArray of objectsrequired

The specified page of FieldOption resources which match the search criterion

totalResultsintegerrequired

The total number of FieldOption resources which match the search criterion

Example:1337
Response
{ "results": [ {}, {} ], "totalResults": 2 }