Data Types
The following data types are supported.
Data Type | Supported Function Operators | Syntax/Rules | Examples |
---|---|---|---|
Boolean | isnull, eq, ne | The accepted values are true and false, not quoted | ?filter=Field eq true |
DateTime | isnull, eq, ge, gt, le, lt, ne | The DateTime should be provided in ISO 6801 format and be contained in single quotes. Time zones (Z) are not supported. | ?filter=Field eq '2022-10-20' and Field2 eq '2022-10-20 12:10:30' |
Decimal | isnull, eq, ge, gt, le, lt, ne | Decimals should not be quoted and the literal 'M' should be provided at the end of the numerical value | ?filter=Field gt 55.75M |
Double | isnull, eq, ge, gt, le, lt, ne | Doubles should not be quoted and the literal 'D' should be provided at the end of the numerical value | ?filter=Field lt 20.00D |
Enum | eq, ne | Enums should not be quoted and provided within pound signs (#). The type should be appended to the enum value, delimited by a period (.) | ?filter=OperatingSystem eq #OperatingSystem.Windows# |
Float | isnull, eq, ge, gt, le, lt, ne | Floating point number. Floats should not be quoted and the literal 'F' should be provided at the end of the numerical value | ?filter=Field ge 207.631F |
Guid | isnull, eq, ge, gt, in, le, lt, ne | Guids must be provided as literals with no quotes. A guid in single quotes would apply to a String data type which is being compared against a string, which happens to be in uuid format. | ?filter=Field eq 'f923516f-363f-43d0-b160-43b4acb97eed' and in(CollectionField, ['2a373c4a-4966-472a-92a4-fe5baa1231bd']) |
Int32 | isnull, eq, ge, gt, in, le, lt, ne | Integers should not be quoted and require no special handling | ?filter=Field eq 250 or in(CollectionField, [10, 15]) |
Int64 | isnull, eq, ge, gt, le, lt, ne | Longs should not be quoted and the literal 'L' should be provided at the end of the numerical value | ?filter=Field ne 952042234398L |
String | isnull, contains, endswith, eq, ge, gt, in, le, lt, ne, startswith | The string value must be single quoted. A single quote within the string should be escaped with an additional ' | ?filter=Field eq 'It was that Developer''s opinion' and Field2 eq 'Nothing to Escape' |
Numerical values require their literal notation and the end of the value.
Supported function operators are case sensitive and will return a validation parsing error if not in lower case format. Field values are case insensitive, however, and the external caller does not need to meet any particular strict casing.