=== modified file 'src/docbkx/en/dhis2_user_man_web_api.xml' --- src/docbkx/en/dhis2_user_man_web_api.xml 2014-08-14 22:54:45 +0000 +++ src/docbkx/en/dhis2_user_man_web_api.xml 2014-08-29 07:48:12 +0000 @@ -5176,6 +5176,43 @@ curl -d @user.json "localhost/api/users/invite" -H "Content-Type:application/json" -u admin:district -v
+ Sharing + The sharing solution allows you to share most objects in the system with specific user + groups and to define whether objects should be public and private. To get and set sharing for + objects you can interact with the sharing resource. To + request the sharing status for an object use a GET request to: + api/sharing?type=dataElement&id=fbfJHSPpUQD + You can define the sharing status for an object using the same URL with a POST request, + where the payload in JSON format looks like this: + { + "meta": { + "allowPublicAccess": true, + "allowExternalAccess": false + }, + "object": { + "id": "fbfJHSPpUQD", + "name": "ANC 1st visit", + "publicAccess": "rw------", + "externalAccess": false, + "user": {}, + "userGroupAccesses": [ + { + "id": "hj0nnsVsPLU", + "access": "rw------" + }, + { + "id": "qMjBflJMOfB", + "access": "r-------" + } + ] + } +} + In this example, the payload defines the object to have read-write public access, no + external access (without login), read-write access to one user group and read-only access to + another user group. You can submit this to the sharing resource using curl: + curl -d @sharing.json "localhost/api/sharing?type=dataElement&id=fbfJHSPpUQD" -H "Content-Type:application/json" -u admin:district -v +
+
Schema Resource A new resource was included in DHIS 2.15 which can be used to introspect all available DXF2 classes, this resource can be found on /api/schemas and for a specific resource, you can have a look at