logo
logo

Entity Object

An Entity Object contains the state of an entity. The following properties are present:

NameTypeDescription
idNumberThe id of the entity
identifierStringThe unique identifier of the entity
selfLinkA link to the resource of this entity
entitydefinitionLinkA link to the Entity Definition Resource that defines this entity.
propertiesObjectA dictionary object containing the properties and values. The contents are highly dependent on the entity definition associated with this entity. See below
relationsObjectA dictionary object containing for each relation a property named after the relation and as value either an Entity Relation object or a Link object depending on whether the specific relation is configured as 'nested or not.

The values of the properties in the properties dictionary are formatted according to the type of property that is defined in the entity definition associated with this entity. The following table describes the different property types and supported value formats:

TypeSupported Value Formats
IntegerNumber containing a valid 32-bit integer, String containing a valid 32-bit integer, Boolean (converting true and false to 1 and 0, respectively)
DecimalNumber, String containing a valid decimal, Boolean (converting true and false to 1 and 0, respectively)
StringNumber (converting to string), String, Boolean (converting to string)
DateTimeString containing an ISO 8601 formatted date and time
BooleanNumber containing either 1 or 0, String containing either "true" or "false", Boolean

Properties that are contain a value per language (their property definition in the entity definition indicates this through the is_multilanguage property) contain an object with for each culture a property named after the RFC 4647 language code containing the property value for that culture, as similar to the Labels object.

In addition, properties that can have multiple values (their property definition in the entity definition indicates this through the is_multivalue property) contain an array of values of the respective type.

Multi-language, multi-value properties contain their values in arrays inside the aforementioned culture object.

Example

{
    "id":1,
    "identifier": "00amyWGct0y_ze4lIsj2Mw",
    "properties":{
        "Property1":"Hello, World!",
        "Property2":[41, 42, 43],
        "Property3":{
            "en-US":true,
            "nl-BE":false
        },
        "Property4":"2013-04-30T14:22:42+02:00",
        "Property5":3.1415
    },
    "relations":{
        "R1":{
            "href":"http://<hostname>/api/entities/1/relations/R1"
        },
        "R2": {
            "children":[
                {
                    "href":"http://<hostname>/entities/2"
                },
                {
                    "href":"http://<hostname>/entities/3"
                }
            ],
            "self":{
                "href":"http://<hostname>/entities/1/relations/R2"
            }
        }
    },
    "entitydefinition":{
        "href":"http://<hostname>/api/entitydefinitions/EntityDefinition1"
    }
}

Can we improve this article ? Provide feedback