An object can represent:
- a physical device (server, processor, router)
- a program module (database, web server)
- a higher-level element relating to business processes (service, platform)
Objects can have an unlimited number of child objects and parents. Objects form a hierarchy with unlimited number of levels.
|class_id||String||The ID of an object class.|
|child_ids||Array<String>||An array of object's child objects IDs.|
|child_link_ids||Array<String>||An array of object's child links IDs.|
|child_ref_ids||Array<String>||An array of object's child references IDs.|
|owner_id||String||The ID of a user who owns the object.|
|parent_id||Array<String>||The IDs of an object's parents.|
|discovery_id||String||Object's discovery ID. See a detailed description below.|
|properties||Array<Property>||An array of object's properties.|
|client_data||String||Object's client data. See a detailed description below.|
|state_id||String||The ID of an object state.|
|tags||Array<Tag>||An array of object's tags.|
|background||String||Object's background image.|
|created||Integer||A timestamp when the object was created.|
|geoposition||Array<Float>||Object's position on a map. It's specified as an array of two float numbers, where the first number is longitude, the second one is latitude.|
|geopositionRadius||Integer||The radius of an object's area displayed on a map.|
|last_state_update||Integer||A timestamp when object's state was last updated.|
|manual_state||ManualState||Object's manual state.|
|operations||Array<Operation>||An array of object's operations.|
|updated||Integer||A timestamp when the object was last updated.|
|_version||Integer||Version of the object. Version increases by 1 every time any field changes in an object.|
There is always Object with id:1 and class_id:1. It's called Root Object. It can be modified, but not deleted.
Object can have one or several Child Objects.
Object can have one or several Parent Objects.
Multi-parent and Reference
You can set several parents for a single object. This is called multi-parent
SAYMON object hierarchy can be compared to a file system:
- a multi-parent is comparable to a hard link;
- a Reference is comparable to a symbolic or soft link.
When you delete Object with multi-parent all other entries of this Object are still remain in SAYMON.
When you delete Object with Reference all References are deleted.
When you delete Reference, nothing happens with Object.
This field can be used along with the Create Object method. If discovery ID is specified in a request body, the method works as follows: if an object with the specified discovery ID doesn't exist, a new object with this ID will be created. If an object with the specified discovery ID already exists, the object's body will be updated. Thus, this field can be used as an external ID created by the user and utilized thereafter to work with an object.
Any method, which uses the object's ID, can also use the object's discovery ID instead. To do that it's necessary to replace <id> with discovery id:<discovery_id> in the request URL.
Clone the object with id = 6013d0c604ab1a73eda738f5 and discovery id = Qwerty:
by ID: http://<saymon_hostname>/node/api/objects/6013d0c604ab1a73eda738f5/clone
by discovery ID: http://<saymon_hostname>/node/api/objects/discovery_id:Qwerty/clone
Discovery ID must not contain the / symbol.
Discovery ID is case-sensitive.
Client data is a set of fields that correspond to various object's UI settings. The fields are specified in the JSON format and stored on a server as a string. The table below contains a description of all fields from the set:
|charts||Array<Array<String>>||An array of plots. Each plot is stored as an array, the first element of which is the ID of the plot, the second one is a mathematical formula for metrics to be displayed on the plot.|
|collapseSections||Map<String, Boolean>||A collection of object's metrics names whose plots should be collapsed. Each record of the collection is a pair, the first element of which is a metric's title, the second one is a boolean value. If the value set to
|custom_style.height||Integer||Object's height (in pixels). Should be specified with the px suffix.|
|custom_style.left||Integer||Object's margin from the left (in pixels). Should be specified with the px suffix.|
|custom_style.top||Integer||Object's margin from the top (in pixels). Should be specified with the px suffix.|
|custom_style.width||Integer||Object's width (in pixels). Should be specified with the px suffix.|
|custom_style.zIndex||Integer||Object's Z-index. The index specifies how overlapping objects should be displayed in the standard view. For example, if there are two overlapping objects, an object with a greater Z-index will be shown above the other object with a smaller Z-index. In other words, objects with greater Z-index are shown above objects with smaller Z-index.|
|headlinePropIds||Array<String>||An array of properties' keys whose values should be displayed on an object's headline.|
|joinedGraphs||Array<String>||An array of plots' IDs displayed on a joined plot.|
|nonPinnedSections||Map<String, Boolean>||A collection of object's sections names that should be unpinned. Each record of the collection is a pair, the first element of which is a section name, the second one is a boolean value. If the value is set to
|widgets||Array<Widget>||An array of widgets configured for the object.|