Searching with Limiters

Before searching with a limiter, an EDS API user can call the /edsapi/rest/info endpoint to determine the limiters available when searching the defined set of databases. Limiter types and values are passed as parameters to the /edsapi/rest/Search endpoint.

Limiter Definition in the /edsapi/rest/info Response

The /edsapi/rest/info endpoint will return limiter definitions. A limiter is defined by the following properties:

ElementDescription
IDA unique identifier for a limiter.
LabelA descriptive string used to identify the limiter to an end user.
TypeDetermines the type of data that’s required of the end user and the format of the data to return as a limiter’s value in a search specification.
ValuesSome limiter types provide a list of values for the user to select from.

Limiter Search Specification

When searching with a limiter, the user must specify to the /edsapi/rest/Search endpoint both the limiter ID and the value. The format of the value is determined by the limiter’s type.

Limiter Types

The type of limiter determines the format of the value that should be returned and whether the limiter definition will contain a ValueList. The limiter definition is returned from the /edsapi/rest/info endpoint.

TypeFormat of ValueEds Api Name
SelectY | yselect
TextAny sequence of characterstext
NumericAny sequence of digits (0-9)numeric
NumericRangeNumeric-Numericnumericrange
RelationalNumeric=Numeric | >Numeric | <Numericrelationalnumeric
YMRangeYYYY-MM/YYYY-MM (see below for more info)ymrange
YRangeYYYY/YYYY (see below for more info)yrange
HistoricalYRange±YYYY/±YYYY (CE dates: +YYYY, BCE dates: -YYYY) (see below for more info)historicyrange
SingleSelectValueValue selected from a limiter’s ValueList (see below for more info)singleselectvalue
MultiSelectValueMultiple values selected from the limiter’s ValueList. Values are separated by a tilde (‘~’). Example: Limiter’s ValueList = [red, green, orange, blue], Selected Values = red~orange (see below for more info)multiselectvalue

Date Types

Date specification follows the ISO-8601 standard for specifying year and year+month.

For specifying a range, to separate the lower from the upper dates of the range a '/' (forward-slash) character is used.

When either the lower or upper dates are missing, we assume the missing date implies all dates either >= or <= the specified date. In both cases, the '/' character is required to locate which is missing.

YMRange

FormatDescription
YYYY-MM/YYYY-MMBetween the 2 specified dates (inclusive of the endpoints)
YYYY-MM/> = YYYY-MM
/YYYY-MM<= YYYY-MM

YRange

FormatDescription
YYYY/YYYYYYYY/YYYY
YYYY/>= YYYY
/YYYY<= YYYY

HistoricalYRange

Historical Range date specification allows for both BCE and CE dates. BCE dates require a – sign. CE dates require a + sign. The year 0000 = 1 BC. So, BC is represented as +0000. This means that all BC dates must be different by 1 when converted; for example, 5 BC becomes -0004.

FormatDescription
±YYYY-MM/±YYYY-MMBetween the 2 specified dates (inclusive of the endpoints)
±YYYY-MM/> = ±YYYY-MM
/±YYYY-MM<= ±YYYY-MM

SingleSelectValue and MultiSelectValue

This type of limiter provides a list of values from which a user picks. If multiple values are selected, the values are concatenated together with a tilde ('~') between them. In EDS API, if multiple values are selected, the values are concatenated together with a comma (',') between them.

For the example below, to specify Red and Green, the value is Red~Green.

  • Red
  • Green
  • Blue
  • Yellow
  • Orange

A list of values may also have child values. An example list with child values is below.

  • MA Cities and Towns
    • Boston
    • Springfield
    • Westbrook
  • NY Cities and Towns
    • New York
    • Albany
    • Westbrook

To select "Westbrook" under "NY Cities and Towns", in the example above the child value is concatenated to the parent value with a hyphen: NY Cities and Towns-Westbrook

To select "Westbrook" in both states in the example above, the values would be separated by a tilde: NY Cities and Towns-Westbrook~MA Cities and Towns-Westbrook