Data types

The /metadata endpoints all return a dataType field which will let you know what sort of data is expected for the field. The data types are as defined in the OpenApi specification. As per the OpenApi specification, the base data type can also have a format modifier, in parentheses, to further define the acceptable values. We'll take a look at the various data types in use below.

String

When the dataType is string without any further format modifier then any string is an acceptable input. If the maxLength field has a value then this is the maximum length that the string can be. The various format modifiers for strings are described further below:

$date

A format modifier of $date indicates that the string should be a date in full-date notation as defined by RFC 3339, for example, 2022-05-01.

$date-time

A format modifier of $date-time indicates that the string should be in date-time notification as defined by RFC 3339, for example, 2022-05-01T14:25:00Z.

Note that if the time-offset component is omitted, then it is assumed that the value is in UTC. For example, a value of 2022-05-01T14:25:00 is treated the same as a value of 2022-05-01T14:25:00Z.

$time

A format modifier of $time indicates that the string should conform to the time component of RFC 3339, for example, 13:25.

$email

A format modifier of $email indicates that the string should be a valid email address, for example, email@test.com.

$url

A format modifier of $url indicates that the string should be a valid url, complete with protocol information, for example, https://www.example.com.

$uuid

A format modifier of $uuid indicates that the string should be a valid unique identifier, for example, ee0ee1de-0d6c-4d8b-aa24-fc1e466afadd.

Integer

A dataType of integer indicates that the field should be a whole number, for example, 43.

Number

The number data type is always specified with the $double modifier. This indicates that the value should be a floating point number with double precision, for example, 4523.45.

Boolean

The boolean data type represents a value that is either true or false.