Attribute Values In REST Assessments

All attribute values in web service requests and responses are never localized and are specified in a culture neutral format as defined in the following table.

Table 1. The culture neutral format for each of the attribute values
Attribute type REST JSON type REST format REST examples Notes
boolean json:boolean true|false true, false  
date json:string YYYY-MM-DD '2010-12-24'

The following conventions are used for dates:

  • YYYY refers to a four-digit year
  • MM refers to a two-digit month (01 through 12)
  • DD refers to a two-digit day of month (01 through 31)

Any timezone information provided for a date value is ignored.

Date values are considered as an abstract date, not a particular point in time that needs to be interpreted according to different timezones.

Values prior to 0001-01-02 or after 9999-09-08 are not supported. This means that the following will cause errors:

  • specifying date values outside the acceptable range, such as 9999-12-31
  • specifying a date with a minus sign.
datetime json:string YYYY-MM-DDThh:mm:ss '2010-12-24T23:59:59'

The following conventions are used for times:

  • T is the literal letter T
  • hh refers to two-digits of hour (00 through 23)
  • mm refers to two-digits of minute (00 through 59)
  • ss refers to two-digits of seconds (00 through 59)

All datetime values are interpreted as being in the timezone of the policy model.

In REST format, there is no optional time zone.

Values prior to 0001-01-02 or after 9999-09-08 are not supported. This means that the following will cause errors:

  • specifying datetime values which include out-of-range dates outside the acceptable range
  • specifying a datetime value with a minus sign.
time json:string hh:mm:ss '23:59:59'

Any timezone information provided for a time value is ignored.

Time values are considered as an abstract time of day, not a particular point in time that needs to be interpreted according to different timezones.

text json:string   'Hello, world!'  
number json:number   123, 123.456  

Even though attribute values are never supplied nor returned directly to or from the web service in a localized manner, there are still some instances where the formatted attribute value appears, namely when that value has been used in text substitution. For example, attribute text, decision report node text, question screen labels and captions. In these case, each attribute value will use the output formats defined for the policy model.