Skip to content

DataObject

DataObject / MetaObject

DataObject is similar to a database table. It has only direct fields, without support to lists.

MetaObject is a representation of record of DataObject.

API

All DataObject has an API REST and SOAP (not generated by default).

SavePatch

Method to partially change the MetaObject, only update the passed fields and returns the updated MetaObject.

Support changing any field including Object type. If the type is Object the value passed will be searched in the another metaObject using the foreign key configuration.

The rule used tries to follow as much as possible the rfc6902, but here we use the follow rules: - It's used the . to access nested properties - Operation rules: - add: Put a value in the field if just if current value is null - replace: Put a value in the field independent of the current value - remove: Remove the value from the field, the value passed is not required

There are not support for SOAP yet.

REST (HTTP PATCH)

The url must be used with the object id, just like in the example above:

http://miisy.com/api/CoffeeDispenser/objects/coffeereqtranslates/5b2319469f02fa2564ab37d9

{
    "fields" : [
        { "op" : "add", "path" : "data.requester", "value": "John Constantine" },
        { "op" : "remove", "path" : "translate" },
        { "op" : "replace", "path" : "translate", "value": { "values": { "pt_BR": "Fechado" }, "localeValue": "Closed" } }
    ]
}