How Ar System Data Types Are Represented in Json - Documentation for Remedy Action Request System 20.08

How Ar System Data Types Are Represented in Json - Documentation for Remedy Action Request System 20.08
Data typeDescriptionCode example

Character and Enum

Character and enum data types use the JSON strings data type. The JSON string data type begins and ends with double quotation marks and contains Unicode characters in a sequence.
// Character value
"foo" : "Hello World!"
 
// Enum value - uses the String value,
// not the integer value or any labels
"Status" : "Assigned"

Integer, decimal, and real

Integer, decimal, and real data types use the JSON number type. The JSON number data type is an integer, real number, decimal point, with exponent part and prefix minus sign but it does not contain hexadecimal and octal forms.
// Integer value
"integerField" : 100
 
// Decimal value
"decimalField" : 25.99
 
// Real value
"realField" : 1.2246e-2

Date, time, and date/time

JSON does not have explicit date, time, and date/time value types. The AR System server follows the ISO 8601 format to represent the date, time and date/time values.
// Date value
"dateOnlyField" : "2014-07-28"
 
// Time value
"dateTimeField" : "2014-12-01T12:48:03.000+0000"
 
// Time of Day value (24-hour clock, hh:mm:ss)
"timeOnlyField" : "13:15:59"

Diary

Diary fields contain multiple character entries that are stamped automatically with the date, time, and the name of the user who enters the item. When the client uses Merge entry or the server returns a response for GET entry, REST sends back an array of diary entries.
"diaryField" : [
    { "user" : "Demo"
     "timestamp" : "2018-12-01T12:48:03.000+0000

"text" : "..."

}

...

]

CurrencyCurrency data types contains four separate parts: decimal value, the currency code, the conversion date, and functional values. The functional values are listed as an array of decimal values where the currency code is the JSON name. This format makes it easy for clients to get a particular functional value directly from the functionalValues object name, rather than reconciling a list of decimal and currency pair objects.

"currencyField" : {
"decimal" : 100.00,
"currency" : "USD",
"conversionDate" : "2014-12-01T12:48:03.000+0000",
"functionalValues" : { "AUD" : 256.11, "EUR" : 167.00, ... }
}

AttacmentsREST treats attachments as a sub resource to the entry. Instead of trying to include binary data in a JSON document, REST treats it as its own resource. REST still maintains some metadata for the attachment, like its name and size, that is returned along with the URL. In this case, the URL is <original-entry-url>/attach/<fieldName>.

"attachmentField" : {
"name" : "photo.jpg",
"sizeBytes" : 12365588,
"href" : " SampleForm/000000000000001/
attach/attachmentField
"

}

Status historyThe primary use case for status history is to display the user name and time stamp for a given status value. The REST API arranges the history values by status. If a client wants to know information about the New status, they can sort the list and get it directly instead of scanning through the entire list.

"statusHistory" : {
"New" : { "user" : "Demo", "timestamp" : "2014-12-01T12:48:03.000+0000"},
"Assigned" : { "user" : "Demo", "timestamp" : "2014-12-01T12:48:03.000+0000" }
}

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.