aboutsummaryrefslogtreecommitdiffstats
path: root/doc/shared/client-update.qdocinc
blob: f1d0874135095e1bc74ae181f6577444b9e56710 (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
27
28
\brief Update an object in the database.

The \a operation is the area in which the \a object gets updated. It defaults to \l Enginio::ObjectOperation
to update regular objects by default.

To change the name property of an object to "New Name", use the following JSON:
\code
{
    "id": "objectId",
    "objectType": "objects.objectType",
    "name": "New Name"
}
\endcode

All other existing properties of the object are not affected by the update.

To update the access control list of an object, use the following JSON:
\code
{
    "id": "objectId",
    "objectType": "objects.objectType",
    "access": { "read": ["id": "userId", "objectTypes": "users"],
                "update": ["id": "userId", "objectTypes": "users"],
                "admin": ["id": "userId", "objectTypes": "users"] }
}
\endcode

\sa EnginioReply, create(), query(), remove()