REST API for Automatic System Time
In V12 and later, support for Automatic System Time is available in the REST API to automatically set time/date/timestamp fields at record creation or update.
A new property, autosystemtime, can be set in the field information in the table object at field creation time to specify this support. Below is an example of a JSON request with auto system time support (see last entry):
{ "fields": [ { "name": "custnumb", "type": "CHAR", "length": 4 }, { "name": "custzipc", "type": "CHAR", "length": 9 }, { "name": "custstat", "type": "CHAR", "length": 2 }, { "name": "custrtng", "type": "CHAR", "length": 1 }, { "name": "custname", "type": "VARCHAR", "length": 47 }, { "name": "custaddr", "type": "VARCHAR", "length": 47 }, { "name": "custcity", "type": "VARCHAR", "length": 47 }, { "name": "custtime", "type": "TIME", "autosystemtime": { "create": true } } ] }
A new field property, autotimestamp, has been added to the table object to specify the support for autosystemtime assignment and the events (create and/or update) that trigger the assignment. Here is the OpenAPI specification:
Table description: Represents a single table. fields [ minItems: 1 { name* string type* string Enum: Array [ 21 ] length integer scale integer precision integer autosystemtime { description: The field is automatically set with systemtime, create and update settings determine when the field is populated, at creation time or at update time. create boolean update boolean } }] }