blob: abf060ded63b81d948ef83d979e64953be09492a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
\brief Insert a new \a object into the database.
The returned \l EnginioReply indicates the success of the object creation.
The object becomes available from the backend if it finishes without errors.
\a operation determines the kind of object created. For example a regular object
or a user or usergroup.
By default, \l Enginio::ObjectOperation is used and regular objects created.
\note that the \tt objectType is required for regular objects and has to begin with
\tt {"objects."}.
The JSON for the object that will be created must follow this structure:
\code
{
"objectType": "object.myType",
"name" : "A thing",
"price" : "5",
}
\endcode
Where only the \tt objectType property is required and \tt name and \tt price
are examples of custom properties.
Users and all kinds of other objects are created the same way but do not require any
\tt objectType.
\sa EnginioReply, query(), update(), remove(), Enginio::Operation
|