Show/Hide Toolbars

TMS XData Documentation

Navigation: URL Conventions

Literals in URI

Scroll Prev Top Next More

When building an URI to perform a request to the server, you sometimes need to include literal values in it. You might need to use literals, for example, when addresing a single entity, where you need to pass the key value in the URI. Or when you use query options like $filter, where you usually include boolean expressions that compare property values to literal values. The following table indicates how to build literal values of several different data types.

 

Data Type

 

Examples

Description

null

 

null

Null value

Boolean

true

false

 

Boolean values

DateTime

2013-12-25

2013-12-25T12:12

2013-12-25T12:12:20.125

 

Date time value must be in the ISO 8601 format (YYYY-MM-DDTdd:mm:ss.zzz). Parts of time can be omitted, for example, you can omit the milliseconds part (zzz) and seconds part (ss), or the full time and provide only the date part.

 

Float

3.14

1.2e-5

 

Float number values. Exponential format is also supported.

Guid

E314E4B3-ECE5-4BD5-9D41-65B7E74F7CC8

Guid value must not have enclosing brackets, must have the hyphens separating the five guid blocks (8 char, 4 char, 4 char, 4 char, 12 char). Each guid block is composed by hexadecimal digits.

 

Integer

1234

Integer values

 

String

 

'John'

Strings must be enclosed in single quotes